MickySmig

Middlesbrough, United Kingdom

Age: 43

Oct
8
awarded Curious
Oct
5
asked Windows Azure 'Design Your SQL Database' link not working
Apr
8
awarded Popular Question
Jun
6
comment Why would Entity Framework carry out update when RowVersion has changed?
I've realised that the reason why this update was going through was that I'm changing the current value of row version and EF uses the original values for concurrency checks. As I'm getting the user from the database after the change has been made the original row version is the same. Sorry to have wasted your time. Many thanks for the help.
Jun
6
comment Why would Entity Framework carry out update when RowVersion has changed?
stackoverflow.com/questions/16952031/…
Jun
6
answered Updating a UserProfile and its Roles using Entity Framework
Jun
6
comment Updating a UserProfile and its Roles using Entity Framework
That was what I thought of at first, but that will change the OriginalValue of RowVersion, if another user has updated in the meantime. Entity Framework uses the (read only) OriginalValues when it compares entities to assess if a concurrency violation has occured
Jun
6
revised Updating a UserProfile and its Roles using Entity Framework
Added additional code for clarification
Jun
6
comment Updating a UserProfile and its Roles using Entity Framework
Yes, I've employed the UnitOfWork pattern, so this is method comes from UnitOfWork.UserProfileRepository.UpdateUserProfile. This UnitOfWork holds a single context that is passed to each repository used and then calls SaveChanges on that context. I've edited the code above to show the controller method.
Jun
6
asked Updating a UserProfile and its Roles using Entity Framework
Jun
4
comment Why would Entity Framework carry out update when RowVersion has changed?
The reason that I'm changing the row version is so that the Concurrency error will be picked up in the first place. The Row Version contained in the view model is the original. if I don't change the row version then I'll never get a concurrency error, as the profile whose state is being painted is retrieved after the first update has taken place.
Jun
4
asked Why would Entity Framework carry out update when RowVersion has changed?
May
31
awarded Commentator
May
31
comment how to create an editable partial view in ASP.NET MVC
Hi Graham, I tried it that way previously and I could only create an EditorTemplate for the RoleViewModel. I actually want to create an EditorTmplate for a list of RoleViewModels that will correspond to List<RoleViewModel>, which is the actual type of the roles property.
May
31
revised how to create an editable partial view in ASP.NET MVC
Error in example code
May
31
asked how to create an editable partial view in ASP.NET MVC
May
19
comment MVC ModelBinding cannot get the label text to bind to a string property
Thanks for the help. You solution is correct. Thanks, as well, for the article reference.
May
19
accepted MVC ModelBinding cannot get the label text to bind to a string property
May
19
asked MVC ModelBinding cannot get the label text to bind to a string property
Oct
1
comment NHibernate composite-element mapping-by-code
Hi @Stefan Steinegger, I could not give you an error message, as I hadn't gotten to the point were I could run the code.
1 2 3