1. Update specific column in linq
using (var context = new db_context())
{
d.Srno = data.Srno;
context.Configuration.ValidateOnSaveEnabled = false;
context.Attendances.Attach(d);
System.Data.Entity.Infrastructure.DbEntityEntry<Attendance> entry = context.Entry(d);
d.Edate = date;
entry.Property(e => e.Edate).IsModified = true;
await context.SaveChangesAsync();
}
No comments:
Post a Comment