This question is locked. New answers and comments are not allowed.
Hi,
I am building an ASP.NET web application with RadControls and Openaccess ORM. I have three projects in my site,
1. Website
2. Business Layer
3. Data Access Layer - which holds the Openaccess RLinq file and the generated classes.
What I cannot seem to figure out is how to calculate values and insert into the ORM (Database). For example,
If I have an Entity which represents a piece of food, it will have an ExpiryDate based on its ProductType and ManufactureDate.
I realize that the ORM generates partial classes, but because ExpiryDate is a property in the generated class, I cannot access it an insert my custom code.
I can use a custom class and 'Translate' it into the FoodEntity class before persisting it, and have my code there. But, if I do this, then the RedGrid auto-update (edit) capabilities are lost because my code will not be accessed in the custom object.
I have looked at the BestPractices webproject, and researched a fair amount on the site, and it seems like creating the Food Object, then translating it into the FoodEntity object prior to context.SaveChanges is probably the best way to go about this.
If anyone has or knows of techniques / samples for doing this (implementing custom code) that would be fantastic.
Thanks,
Kieren
I am building an ASP.NET web application with RadControls and Openaccess ORM. I have three projects in my site,
1. Website
2. Business Layer
3. Data Access Layer - which holds the Openaccess RLinq file and the generated classes.
What I cannot seem to figure out is how to calculate values and insert into the ORM (Database). For example,
If I have an Entity which represents a piece of food, it will have an ExpiryDate based on its ProductType and ManufactureDate.
I realize that the ORM generates partial classes, but because ExpiryDate is a property in the generated class, I cannot access it an insert my custom code.
I can use a custom class and 'Translate' it into the FoodEntity class before persisting it, and have my code there. But, if I do this, then the RedGrid auto-update (edit) capabilities are lost because my code will not be accessed in the custom object.
I have looked at the BestPractices webproject, and researched a fair amount on the site, and it seems like creating the Food Object, then translating it into the FoodEntity object prior to context.SaveChanges is probably the best way to go about this.
If anyone has or knows of techniques / samples for doing this (implementing custom code) that would be fantastic.
Thanks,
Kieren