public void UpdateOtherAuthor(Entities.OtherAuthor otherAuthor) { otherAuthor.ModifiedDateTime = System.DateTime.Now; otherAuthor.Status = 2; context.Entry(otherAuthor).State = EntityState.Modified; context.SaveChanges(); }
public void AddOtherAuthor(Entities.OtherAuthor otherAuthor) { //todo: shift this system updated system fields to unitofwork otherAuthor.ModifiedDateTime = System.DateTime.Now; otherAuthor.Status = 1;//todo:later status will have status enums context.OtherAuthors.Add(otherAuthor); context.SaveChanges(); }