public bool Update(Room Room) { if (string.IsNullOrEmpty(Room.ID)) { throw new Exception("没有房间ID"); } ISqlMapper mapper = MapperHelper.GetMapper(); RoomDao dao = new RoomDao(mapper); return dao.Update(new RoomUpdateForm { Entity = Room, RoomQueryForm = new RoomQueryForm { ID = Room.ID } }); }
public string Add(Room Room) { ISqlMapper mapper = MapperHelper.GetMapper(); RoomDao dao = new RoomDao(mapper); return dao.Add(Room); }