I want to read the Factory Method information for each one of my entities at a very specific moment ... at SavingChanges time
I'd like to iterate trough all of the values defined in the Model Entities classs (the MyModel.Designer.cs file) so I can perform some CRUD operations taht I need to execute at that very precise moment
Hi Carlos, this seems a very similar question to some others you have on the go and I think is will be the same answer, to use the saving changes event of the data model.
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
Thank you. I was asking how to do that .... I'd like to know the way you do the iteration among the set of columns of an entity
What I meaan is that I don't have an idea on how to do the loop (the iteration) among those columns. How do you write the foreach statement to do the loop ?
klca
Member
507 Points
413 Posts
Reading #region Factory Method in MyModel.Designer.cs
Dec 07, 2012 08:33 PM|LINK
Hi,
I want to read the Factory Method information for each one of my entities at a very specific moment ... at SavingChanges time
I'd like to iterate trough all of the values defined in the Model Entities classs (the MyModel.Designer.cs file) so I can perform some CRUD operations taht I need to execute at that very precise moment
How can you do that?
Carlos N. Porras
(El Salvador)
sjnaughton
All-Star
27318 Points
5458 Posts
MVP
Re: Reading #region Factory Method in MyModel.Designer.cs
Dec 08, 2012 12:19 PM|LINK
Hi Carlos, this seems a very similar question to some others you have on the go and I think is will be the same answer, to use the saving changes event of the data model.
Always seeking an elegant solution.
klca
Member
507 Points
413 Posts
Re: Reading #region Factory Method in MyModel.Designer.cs
Dec 08, 2012 01:18 PM|LINK
Hi,
Thank you. I was asking how to do that .... I'd like to know the way you do the iteration among the set of columns of an entity
What I meaan is that I don't have an idea on how to do the loop (the iteration) among those columns. How do you write the foreach statement to do the loop ?
Carlos N. Porras
(El Salvador)
sjnaughton
All-Star
27318 Points
5458 Posts
MVP
Re: Reading #region Factory Method in MyModel.Designer.cs
Dec 08, 2012 02:04 PM|LINK
I'll try for a smaple real soon, I have beeendragged off to a new project
but should be
able to include this new auditing in that anyway.
Always seeking an elegant solution.