public void Update(Member_Action 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(); }
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; }
public void Delete(Member_Action model) { var target = Find(model.ID); db.Remove<Member_Action>(target); db.Commit(); }
public void Create(Member_Action model) { db.Add<Member_Action>(model); db.Commit(); }