AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

CSLA Template Issues #621

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am generating a CSLA project using the DataAccessImplementation LinqToSQL and 
there are a couple of issues with the templates.

First in 10 files have a hardcoded reference to PetshopDataContext:

var ctx = ContextManager<DAL.PetshopDataContext>

and I believe it should be:

var ctx = ContextManager<DAL.<%=LinqToSQLDataContextName%>>

The Ten files are:
BusinessLayer\Internal\ExistsCommand.cst
BusinessLayer\Internal\NameValueList.cst
Common\ChildFetch.LinqToSQL.cst
Common\ChildInsert.LinqToSQL.cst
Common\ChildUpdate.LinqToSQL.cst
Common\DataPortalDelete.LinqToSQL.cst
Common\DataPortalFetch.LinqToSQL.cst
Common\DataPortalFetchList.LinqToSQL.cst
Common\DataPortalInsert.LinqToSQL.cst
Common\DataPortalUpdate.LinqToSQL.cst

Second in Criteria.Generated.cst in "public Type EntityType" the return value 
needs to be changed from:

return typeof(DAL.<%= Entity.Table.Name%>);

To:

return typeof(DAL.<%=StringUtil.ToPascalCase(Entity.Table.Name)%>);

Third in Map function of the output for each 
EditableRoot.DataAccess.LinqToSQL.cst there is an unneeded ")".  This comes 
from the MapLinqToSQL.cst on line 38 and 41.  Inside the 
"using(BypassPropertyChecks)" the line will look something like:

                _sbinica = DataSource.Sbinica);

As you can see the ")" is not needed.

I am using v6.0.0 Revision 14013 and I updated my templates on 2/6.

Please let me know if you have any questions.

Thanks

dbl

Original issue reported on code.google.com by ibflyfis...@yahoo.com on 7 Feb 2012 at 6:11

GoogleCodeExporter commented 9 years ago
Hello,

These were user contributed features. I'll make sure these get updated.

Original comment by bniemyjski on 9 Feb 2012 at 10:42

GoogleCodeExporter commented 9 years ago
Issue 557 has been merged into this issue.

Original comment by bniemyjski on 9 Mar 2012 at 4:41

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2532.

Fixed a bug where the Linq-to-sql integration had PetShop hard coded.
Fixed a bug where an extra paren was being generated on Linq-to-SQL Generation.
Fixed a bug where the Criteria TypeName property was being generated 
incorrectly with Linq-to-sql generation.

Original comment by bniemyjski on 12 Mar 2012 at 4:14

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 12 Mar 2012 at 4:14

GoogleCodeExporter commented 9 years ago
Issue 554 has been merged into this issue.

Original comment by bniemyjski on 12 Mar 2012 at 4:15