public void UpdateUserEntity() { var ctx = new EconomicsArcadeDbContext(ConnString); var userEntity = ctx.Users.Find(1); userEntity.UpdateDateTime = DateTime.Now; ctx.SaveChanges(); //ctx.UserEntitySet. }
public void CreateUserEntity() { var entity = new UserEntity { Email = "*****@*****.**", CreateDateTime = DateTime.Now }; var ctx = new EconomicsArcadeDbContext(ConnString); ctx.Users.Add(entity); ctx.SaveChanges(); //ctx.UserEntitySet. }