I have been using and modifying ORM.NET for over a year now and am willing to help with any questions you might have with it.
I have integrated such feature as error checking (required, length, uniqueness, subset, etc), default values, additional meta data (i.e. primary key, required, length, attribute), web service support, MySql support, bug fixes, and many other features.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use ORM.NET to generate code for my project. Now I have a question about the Identity column.
The ORM.NET set the identity column as a required field, but in New() method when I put a parameter in, it report a exception: when IDENTITY_INSERT set OFF, the table can't insert explicit value. Why? Could you help me to solve the problem? Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Call you DataManager's New method with the values and then call DataManager.CommitAll() with do a single commit. You can also wrap your connection in a transaction.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
luchunlei
The New() method should not have a parameter for an idenitity column. I am guessing that when you did your last CodeGen (running ORM.NET) it was not an identity column at that time and the database was later modified to be an identity column.
Running the code gen against the same database will update your project and generated code should fix your problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Apologies for spamming this forum, am just glad to see some action around here. I've picked up ORM.NET a few months ago and am very pleased with it for the size of the projects I've been using it for (small to medium). It gives me a very quick ORM wrapper around my db. I'm also using .NET 2.0, with SQL Server 2005. I'm using the modified version posted here for use with SQL Server 2005 which fixes the primary key issue: http://sourceforge.net/forum/forum.php?thread_id=1376064&forum_id=401966
I've also modified my version to use .net types instead of sqldatatypes.
Hope to keep seeing you all around here.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you say you've also modified my version to use .net types instead of sqldatatypes do you mean that you are using the .net nullable types that are new to .net 2.0?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are no problems that are serious unless you are working with complex windows forms (example, gridview with inline edits or concurrency) or GUIDs.
I used ORM.NET for about a year without needs hardly any new features or bug fixes. Overall it is very stable in web development. Working with Windows forms I had a lot of concurrency issues.
Working with objects that had been previously deleted or new object edits that got canceled was a reoccuring problem. Both seem to happen a lot more in Windows forms.
Nullable GUID properties also did not work correctly (example, an empty GUID should be treated as null).
The main thing that I have done is to add new features.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been using and modifying ORM.NET for over a year now and am willing to help with any questions you might have with it.
I have integrated such feature as error checking (required, length, uniqueness, subset, etc), default values, additional meta data (i.e. primary key, required, length, attribute), web service support, MySql support, bug fixes, and many other features.
Hi
Good on you mate. I'm sure you're expertise will be a great value.
Cheers
Ariyawansa
Hi David
I'm using .net v.2 with sql server 2005. Noting seems to be smooth with this combination. Identity/AutoIncrement etc has been a PIB.
If you have a version which is working smoothly, could you provide a down- loadable version with a Log file of changes?
Cheers
Ariyawansa
I use ORM.NET to generate code for my project. Now I have a question about the Identity column.
The ORM.NET set the identity column as a required field, but in New() method when I put a parameter in, it report a exception: when IDENTITY_INSERT set OFF, the table can't insert explicit value. Why? Could you help me to solve the problem? Thanks!
Hi David,
Can you please help me in inserting the bulk data using the orm.net
I am getting a set of collection values which i have to to insert in the table in single commit.can you please send a sample code if you have any.
Call you DataManager's New method with the values and then call DataManager.CommitAll() with do a single commit. You can also wrap your connection in a transaction.
For example:
Customer customer;
customer = dataManager.NewCustomer(myRequiredValue1, myRequiredValue2);
customer.myOptionalValue1 = "someOptionalValue1"
customer = dataManager.NewCustomer(myOtherRequiredValue1, myOtherRequiredValue2);
customer.myOptionalValue1 = "someOtherOptionalValue1"
dataManager.CommitAll();
Thanks David for solving my problem by giving the example for How to insert the bulk data in a single commit.
luchunlei
The New() method should not have a parameter for an idenitity column. I am guessing that when you did your last CodeGen (running ORM.NET) it was not an identity column at that time and the database was later modified to be an identity column.
Running the code gen against the same database will update your project and generated code should fix your problem.
Apologies for spamming this forum, am just glad to see some action around here. I've picked up ORM.NET a few months ago and am very pleased with it for the size of the projects I've been using it for (small to medium). It gives me a very quick ORM wrapper around my db. I'm also using .NET 2.0, with SQL Server 2005. I'm using the modified version posted here for use with SQL Server 2005 which fixes the primary key issue:
http://sourceforge.net/forum/forum.php?thread_id=1376064&forum_id=401966
I've also modified my version to use .net types instead of sqldatatypes.
Hope to keep seeing you all around here.
When you say you've also modified my version to use .net types instead of sqldatatypes do you mean that you are using the .net nullable types that are new to .net 2.0?
David,
Question for you, what bug fixes have you made? Anything serious that I should look out for or possibly upgrade for?
There are no problems that are serious unless you are working with complex windows forms (example, gridview with inline edits or concurrency) or GUIDs.
I used ORM.NET for about a year without needs hardly any new features or bug fixes. Overall it is very stable in web development. Working with Windows forms I had a lot of concurrency issues.
Working with objects that had been previously deleted or new object edits that got canceled was a reoccuring problem. Both seem to happen a lot more in Windows forms.
Nullable GUID properties also did not work correctly (example, an empty GUID should be treated as null).
The main thing that I have done is to add new features.
By the way, I am now a developer on the ORM.NET project and will be actively developing on it.