 |
|
 |
Which version of codesmith are you using as I'm getting the folling error?
(0,0): error CODESMITH0001: Unable to resolve assembly "QuickStartUtils". Make sure the assembly is located in the main application directory, in the same directory as the template file or has been registered in the global assembly cache.
(0,0): error CODESMITH0005: Unknown directive "Register".
(130,10): error CS1513: } expected
(130,14): error CS1520: Class, struct, or interface method must have a return type
(144,4): error CS1597: Semicolon after method or accessor block is not valid
(146,2): error CS0116: A namespace does not directly contain members such as fields or methods
(185,16): error CS1518: Expected class, delegate, enum, interface, or struct
(195,25): error CS1518: Expected class, delegate, enum, interface, or struct
(203,16): error CS1518: Expected class, delegate, enum, interface, or struct
(214,16): error CS1518: Expected class, delegate, enum, interface, or struct
(225,16): error CS1518: Expected class, delegate, enum, interface, or struct
(236,16): error CS1518: Expected class, delegate, enum, interface, or struct
(247,16): error CS1518: Expected class, delegate, enum, interface, or struct
(258,16): error CS1518: Expected class, delegate, enum, interface, or struct
(269,16): error CS1518: Expected class, delegate, enum, interface, or struct
(280,16): error CS1518: Expected class, delegate, enum, interface, or struct
(291,16): error CS1518: Expected class, delegate, enum, interface, or struct
(302,16): error CS1518: Expected class, delegate, enum, interface, or struct
(313,16): error CS1518: Expected class, delegate, enum, interface, or struct
(324,16): error CS1518: Expected class, delegate, enum, interface, or struct
(339,25): error CS1518: Expected class, delegate, enum, interface, or struct
(422,1): error CS1022: Type or namespace definition, or end-of-file expected
|
|
|
|
 |
|
 |
I've been tracking down these templates and i believe is a great improvement to these Linq to Sql "trend"
Now, they recently added WCF support and by using the QuickStart.cst that they provide they actually generate the whole WCF for all entities and its native methods.
Now, i can't find the way to add this by managing outputs, using Visual Studio 2008. I am kinda stuck in this part.
Does anyone knows how to do this?
Thank You
|
|
|
|
 |
|
 |
Hi,
I have to admit that I am new to Codesmith too and therefore I might be doing something wrong.
I have followed your example to the letter on the northwind Database but I get an error "Error loading Dbml"
File"
i am totally lost as i cannot see anything.
Any suggestions?
Also 1 limitation if you like is that you have to use the DBML file .Well where i work we have 800 tables and 4000 stored procedures ,both sqlMetal and yours fail miserably for various reasons in creating a dbml file.
Also it's unmanagable with so many table,therefore we would only generate classes.
Any suggestion on this?
Also it would be helpful if we could download a sample Solution where we see how it all works.
Would that be possible?
Thanks
thanks a lot
|
|
|
|
 |
|
 |
I have exactly the same error message, "Error loading Dbml", when generating the entities based on the following *latest* templates - v1.3.3239 - downloaded from http://code.google.com/p/codesmith/
Also, if i do get it working am I able to edit the template so that the Column/@UpdateCheck attribute can be modified & preserved? (ie. the partial class entity column attribute)
Any help would be appreciated?
modified on Monday, June 16, 2008 11:47 PM
|
|
|
|
 |
|
 |
Hi Paul,
Nice article. Thank you for sharing this knowledge with the world
You're named article "Supercharge LINQ to SQL" but I was unable to understand why I should use CodeSmith templates instead of VS 2008 LINQ to SQL designer?!
What are the actual advantages? and disadvantages?
Thanks
Galin Iliev
|
|
|
|
 |
|
 |
There are several advantages to using the PLINQO templates over the designers. Here is a list of the main reasons:
1) Remove the designer black box and allow for customization of the ouput while still retaining the ability to use the .dbml designer to make customizations inside of Visual Studio.
2) Ability to easily generate your entire .dbml file for a database and then the ability to regenerate that .dbml file as the schema changes. The regeneration preserves any customizations you may have made such as entity, property and relationship names. With the designer, if you make a database change, you need to drop the entity and re-add it to get any new columns or data type changes, which would cause you to lose any customizations you may have made. Also, using the templates allows you to exclude unwanted tables, stored procedures and views using filter expressions and automatically strip / clean entity and property names of things like prefixes and suffixes that your database schema may be using (ie. tbl_Customer to Customer).
3) A business rules engine that allows you to enforce things like property length rules, required field rules, regex data validation rules as well as several other built in rules including authorization rules. The SubmitChanges method on the data context object will automatically run the rules against any entities in your change set. If all rules are not met, a BrokenRulesException will be thrown that contains a list of the broken rules.
4) A manager class is generated for each entity that encapsulates all actions taken on an entity. Known common actions like retrieving entities by primary key, indexes, and foreign keys are generated. Any custom actions can be added and will be preserved during regeneration. While LINQ makes it easy to sprinkle your data access logic throughout your entire application, we still believe its poor design to do so and that is why we have included the manager classes.
~ Paul
|
|
|
|
 |
|
|
 |
|
 |
Just wondering, Linq to SQL has some other short comings like missing multi tier support. Does PLINQO handle this or is it going to be the same issue as Linq?
BTW it looks great! Just be interested in how your handling that one.
Cheers,
John
|
|
|
|
 |
|