What's Wrong With This Code? (#29)
Posted by: K. Scott Allen,
on 02 Apr 2012 |
View original | Bookmarked: 0 time(s)
Here is some code similar to other code I've seen that has a severe bug. The Entity Framework model configuration is setup to allow optimistic concurrency checks via a movie's Version property. public class Movie
{
public virtual int ID { get; set; }
public virtual string Title { get; set; }
public byte[] Version { get; set; }
}
public class MovieDB : DbContext
{
public DbSet<Movie> Movies { get; set; }
protected override void OnModelCreating(
DbModelBuilder...