public Room CreateRoom(string name) { var room = new Room {Name = name}; if (_rooms.FirstOrDefault(x => x.Name == name) != null) { _rooms.Add(room); } return room; }
public RoomServiceMock() { _rooms = new List<Room>(); var room = new Room { Name = "DotNetters" }; _rooms.Add(room); }