public void CreateFurnitureAction(FurnitureAction furnitureAction) { Execute(@" insert into FurnitureAction (Date, Furniture, RoomId, ActionType) values (@Date, @Furniture, @RoomId, @ActionType) ", furnitureAction); }
public void CreateFurniture(string furnitureName, string roomName, DateTime date) { var room = dao.GetRoom(roomName); if (room == null || !room.Id.HasValue || room.RemoveDate.HasValue) { return; } var action = new FurnitureAction { RoomId = room.Id.Value, Furniture = furnitureName, Date = date, ActionType = FurnitureActionType.Create }; dao.CreateFurnitureAction(action); }