Profile p = db.Profile.Where(m => m.MemberId == MemberUID).Single();
db.Entry(p).State = EntityState.Modified;
p.LastUpdatedDate = DateTime.Now;
db.SaveChanges();
I want to update the LastUpdatedDate but its giving me an error
"The property 'LastUpdatedDate' is part of the object's key information and cannot be modified."
NOTE:LastUpdatedDate is not a primary key it is just set as entity key
I want to update this as it is .. is there any way to do so ? help will be appreciated
Model
public partial class Profile
{
public System.DateTime LastUpdatedDate { get; set; }
}