示例#1
0
 public void UpdateOtherAuthor(Entities.OtherAuthor otherAuthor)
 {
     otherAuthor.ModifiedDateTime     = System.DateTime.Now;
     otherAuthor.Status               = 2;
     context.Entry(otherAuthor).State = EntityState.Modified;
     context.SaveChanges();
 }
示例#2
0
 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();
 }