Пример #1
0
 public Member_Action Create(Member_ActionViewModel model)
 {
     var entity = new Member_Action();
     entity.ActionType=model.ActionType;
     entity.MemberID=model.MemberID;
     entity.Description=model.Description;
     entity.IP=model.IP;
     entity.AddTime=model.AddTime;
     db.Add<Member_Action>(entity);
     db.Commit();
     return entity;
 }
Пример #2
0
 public Member_Action Update(Member_ActionViewModel model)
 {
     var entity = Find(model.ID);
     db.Attach<Member_Action>(entity);
     entity.ActionType=model.ActionType;
     entity.MemberID=model.MemberID;
     entity.Description=model.Description;
     entity.IP=model.IP;
     entity.AddTime=model.AddTime;
     db.Commit();
     return entity;
 }