Beispiel #1
0
 public void Update(Member model)
 {
     var target = Find(model.ID);
     db.Attach<Member>(target);
     target.Name = model.Name;
     target.Password = model.Password;
     target.GroupID = model.GroupID;
     db.Commit();
 }
Beispiel #2
0
 public Member Create(MemberViewModel model)
 {
     var entity = new Member();
     entity.Name = model.Name;
     entity.Password = model.Password;
     entity.GroupID = model.GroupID;
     db.Add<Member>(entity);
     db.Commit();
     return entity;
 }
Beispiel #3
0
 public void Delete(Member model)
 {
     var target = Find(model.ID);
     db.Remove<Member>(target);
     db.Commit();
 }
Beispiel #4
0
 public void Create(Member model)
 {
     db.Add<Member>(model);
     db.Commit();
 }