Frequently Asked Questions

What are the requirements to use the NuSoft Framework?

You will need to have CodeSmith version 4.1.2 or higher. It is highly recommended that you have the latest version of CodeSmith, as we've noticed differences between how some of the APIs return data between even version 4.0.4 and 4.1.2, however we have heard that it works just fine with version 3.2. You will also need a database running on SQL Server 2005. We do support SQL Express as well.

How do I get started?

Here is some sample code for working with an entity generated by the NuSoft Framework.. Let's say you generated some code from the adventureworks sample database.

Get a collection contacts

EntityList<Contact> contacts = AdventureWorks.Business.Contact.GetContacts();

Get one contact

Contact contact = AdventureWorks.Business.Contact.GetContact(1);

Create a new contact

Contact contact = AdventureWorks.Business.Contact.CreateContact();
contact.FirstName = "my first";
contact.LastName = "user";
contact.Save();

Update a contact
Contact contact = AdventureWorks.Business.Contact.GetContact(1);
contact.FirstName = "my first";
contact.LastName = "user";
contact.Save();

Delete a contact
Contact contact = AdventureWorks.Business.Contact.GetContact(1);
contact.Delete();

How are class names deteremined in the NuSoft Framework?

We try to support databases that use plural names for tables as well as databases that use singular names for tables. Our default model is to create classes with singular names and collections of classes with plural names. We use the built-in string utilities in CodeSmith to convert from plural names to singular names and singular names to plural names. We understand this isn't perfect, and offer other a way to override class naming. There are two Extended Properties you can add to a table to affect how naming works:
  • NSFx_EntityName: This will be the class name for the entity.
  • NSFx_EntityPluralName: This will be used for any collections of this type of entity.

When I generate my code, I get an error. What do I do?

Several developers at NuSoft Solutions monitor the activity of the NuSoft Framework on a daily basis. We will try to answer every question as quickly as possible. Please start a discussion so others can also see what the solution was. Having said that, there is one common reason that generation or compilation of the generated code may fail:
  • A property has the same name as the class it is contained in. This can be fixed by adding an Extended Property called NSFx_EntityPropertyName to the column in the database. The value for the extended property is what will be used for the property name.

Last edited Oct 9, 2007 at 12:32 PM by RossCode, version 6

Comments

No comments yet.