Using the CodeSmith C# Templates on Codeplex for CSLA v. 3.8, is there a way to generate an entity from a stored procedure? This used to be possible way back when. I ask b/c we want to create some 'Light' objects which we would do so after writing the SP for it.
Tks.
Hello,
Generating from a view or stored procedure is currently not possible. We have thought about adding support for this in one of the next versions of the templates. If we did this the light objects would more than likely be limited to read only BO as there would be no way for us to update the BO or do deletes against it intelligently. Could you please log this request on the CodeSmith bug tracker.
Another possibility is for us to update the ignore expression regex to be applied to columns as well.
Thanks
-Blake Niemyjski
Hi Blake,
Has anything been done on modifying the ignore expression regex to strip out columns?
Another possibility would be to have a collection of columns you would like to include - this being more useful on tables with loads of columns.
More often than not we create business objects that contain just the fields that we require.
Thanks
Peter
Hello,
Support for this hasn't been added, but the templates could be modified very easily to support this. I think there would have to be a discussion on what to check by. You wouldn't want to exclude table columns that are required (non nullable with no default values). But you would want to ignore all columns from a view or read only Business Object. Could you please log this request on the CodeSmith bug tracker.
Thanks
-Blake Niemyjski
Hello,
I have committed a patch for this on the following Google Code Issue.
Thanks
-Blake Niemyjski
Copyright (c) Marimer LLC