Home   Free Applications   Code Snippets   Fun Stuff 
 
 You are here: Home > Free Applications > Templates
Register   Login  

 
Site Navigation


Print Print this page
Email E-mail this page
Bookmark Add to Favorites

 
File Name: ORMapper.Templates.3.0.zip
File Size: 44,786 bytes
Downloaded: 1824 times
Posted by pwelter34 on Sunday, July 31, 2005 (EST)
1) Selectable support for .net 2.0 framework
2) Now generates two partial class files for every table
3) Retrieve methods now return Collection generics
4) Test generator can now generate Team System tests

ORMapper.Templates.3.0

  1. Selectable support for .net 2.0 framework
  2. Now generates two partial class files for every table
  3. Retrieve methods now return Collection generics
  4. Test generator can now generate Team System tests
Click here to download this file
Average Rating:

Comments:

namespace is NOT declared in the class files
By mkamoski on Monday, August 01, 2005 (EST)

Paul--

Please help. I am new to your CodeSmith Templates for the WilsonORMapper. First, with the Mappings file template, I specify the namespace that I want and I generate a Mappings.config file. Next, with Class file template, I point to the mappings file and I generate the classes. When I am done, the Mappings.config file does have the fully-qualified class names in it, as expected-- the namespace is clearly noted. However, when I look at the generated classes, the namespace is NOT declared in the class files. I am using VB.NET. I am going to hack the template file for now; but, I am wondering what is going on. Am I missing something? Please advise.

Thank you.

--Mark Kamoski

Reply to this Comment

compatible with CodeSmith 3.0
By mkamoski on Monday, August 01, 2005 (EST)

Paul--

Are the CodeSmith Templates for the WilsonORMapper at http://www.LoreSoft.com compatible with CodeSmith 3.0 at all?

Please advise.

Thank you.

--Mark Kamoski

Reply to this Comment

RE: namespace is NOT declared in the class files
By pwelter34 on Monday, August 01, 2005 (EST)

The vb templates assume that the Root Namespace is set on the vb project.  In a vb.net project, the root namespace is automatically added to classes.  Verify that the Root Namespace is set in the properties of the project.  You can use the Class View to see what the final namespace is for each generated class.

 

Hope that helps,

~ Paul

 

Reply to this Comment

RE: compatible with CodeSmith 3.0
By pwelter34 on Monday, August 01, 2005 (EST)

I've been using CodeSmith 3.0 for some time with out issue. Are you having issues?  I've tried to make the templates compatible with both 2.6 and 3.0.  The only issue you may have is if you had some command line scripts to run the templates.  The command line syntax for 3.0 changed.

 

~ Paul

Reply to this Comment

3.0 Compatibility
By slowram on Monday, August 01, 2005 (EST)

I haven't got the latest template versions as I'm not ready for .net 2.0 untils it's release in October, but the past builds I've tried have worked in 3.0 EXCEPT if you're needing to hit against MySQL. 

I haven't found a MySQL driver for Codesmith 3.0, but that's no fault of the templates it's a Codesmith issue and for someone that knew how to proberly create the driver (they did it for 2.0) it probably would be easy enough to recode for 3.0.  The problem being though there is no free version of 3.0 (hopefully that changes) which greatly reduces the number of people who will take the time to convert/recode for 3.0 thankfully it's pretty much backward compatible, but you will not see many templates taking advantage of the new 3.0 features because it has no free version.

Reply to this Comment

RE: 3.0 Compatibility
By pwelter34 on Monday, August 01, 2005 (EST)
By the way, the latest templates still support .net 1.1. There is a template property that sets the framework version and it defaults to version 1.1. ~ Paul

Reply to this Comment

escape keyword property names with []
By mkamoski on Tuesday, August 02, 2005 (EST)

Paul--

This is a suggestion.

I think that the templates should escape keyword property names with []. It would be nice to have.

I have done this for the VB templates and will send the code to you via email.

(BTW, I searched this site for your actual email address but could not find it. I am probably just blind. It is not in your profile. Odd, I thought. I Googled your name and got PWelter@LoreSoft so that's what I am using. Please let me know if I should be using something else.)

(I know that keywords should be avoided; but, wouldn't you know one of the most commonly used examples, Northwind, breaks this rule. Furthermore, the mapping file schema itself used “Alias” which is not so good.)

Anyway, please consider it.

Thank you.

--Mark Kamoski

Reply to this Comment

typo in VB.Class.cst
By mkamoski on Tuesday, August 02, 2005 (EST)

Paul--

FYI, there seems to be a typo in VB.Class.cst.

The following line exists...

<%= propties.ToString() %>

...which, while it does work, it seems to be misspelled.

Of course, it is a small detail; but, I thought you might want to know about it.

Thank you.

--Mark Kamoski

Reply to this Comment

consider supporting an optional interface
By mkamoski on Tuesday, August 02, 2005 (EST)

Paul--

For the code templates, you might consider supporting an optional interface.

That is, allow the template user to set some switches to force the code to use some interfaces.

I used this techinque with another code generator (sorry, it was a long time ago) and it worked great.

I created an in-house tweak to the templates for us here at our shop and have sent the code to you.

Thank you.

--Mark Kamoski

Reply to this Comment

Why not use typed collections
By dmcollie on Tuesday, August 02, 2005 (EST)
Hi, first of all thanks for the great work. Now I have a question to do with the use of IList as opposed to Collection<classname> for returning one to many relationships. I note that methods such as RetrieveAll() return Collection<<%= ClassName %>> but one-to-many object lists return IList. Why is that? It would be better (but I am a novice with WORM...) to return the typed collection always wouldn't it? Perhaps a quirk of WORM that I am not aware of requires IList being returned? <br/> Thanks Dave

Reply to this Comment

RE: Why not use typed collections
By pwelter34 on Tuesday, August 02, 2005 (EST)

Currently, WORM does not support generic types for relationships.  See http://www.wilsondotnet.com/Tips/ViewPosts.aspx?Thread=1259.

However, I'm working on a fix to WORM that will allow it to support generic types for relationships.  Hopefully, it will make it in the next version.

~ Paul

Reply to this Comment

RE: escape keyword property names with []
By pwelter34 on Tuesday, August 02, 2005 (EST)

Mark,  thanks so much for contributing fixes and features.  I'll be adding them in for the next release.  Thanks again. 

~ Paul

 

Reply to this Comment

Thanks
By dmcollie on Wednesday, August 03, 2005 (EST)
See subject ;)

Reply to this Comment



Top
 
CNET News.com


Tech news and business reports by CNET News.com. Focused on information technology, core topics include computers, hardware, software, networking, and Internet media.

  • Security Bites 113: The security of Chrome
    Billy Hoffman of HP Web Security talks about Google's new browser, how it handles Javascript and what it means for Web 2.0 security.

  • Are Demo and TechCrunch50 fragmenting their audiences?
    With both events scheduled to start Monday, many press, as well as venture capitalists and others are having to choose which one to attend.

  • A user guide to following DemoFall and TechCrunch50
    More than 100 products are going to be introduced during the week of September 8. Will they be any good?

  • What's McCain doing in front of my junior high?
    Speculation has it that it was a goof-up that had the Republican nominee standing in front of Walter Reed Middle School during his acceptance speech. In any case, the image brings back memories for CNET News' Ina Fried.

  • Microsoft tries to reclaim Windows' image
    After years of letting Apple's attack ads go unanswered, software maker sets out on difficult, costly journey of trying to take back control of what Windows stands for.


    Copyright 1995-2008 CNET Networks, Inc. All rights reserved. Last Refreshed 9/5/2008 3:27:04 PM
  •