public static IDevice Map(ExampleDeviceDTO deviceDTO) { IDevice device = new ExampleDevice { Id = deviceDTO.Id, Name = deviceDTO.Name, Enabled = deviceDTO.Enabled }; return(device); }
public async Task <bool> UpdateDevice(int id, ExampleDeviceDTO deviceNewValues) { return(await Task.FromResult(_repoReference.Update(id, Mapper.Map(deviceNewValues)))); }
public async Task <bool> RemoveDeviceFromRoom(RoomDTO referenceRoom, ExampleDeviceDTO newDevice) { return(await Task.FromResult(_repoReference.RemoveDeviceFromRoom(referenceRoom.Id, Mapper.Map(newDevice)))); }
public async Task <bool> AddDevice(ExampleDeviceDTO newDevice) { return(await Task.FromResult(_repoReference.Add(Mapper.Map(newDevice)))); }