public static InfrastructureDevice ToInfrastructure(this DomainDevice @this) { return(new InfrastructureDevice() { Name = @this.Name, UserId = @this.UserId }); }
public static DeviceModel ToDeviceModel(this DomainDevice @this) { return(new DeviceModel { DeviceID = @this.DeviceID, DeviceName = @this.DeviceName, UserID = @this.UserID }); }
public static DeviceModel ToModel(this DomainDevice @this) { return(new DeviceModel() { Name = @this.Name, UserId = @this.UserId }); }
public static DeviceAPI ConvertToAPI(this DomainDevice domainDevice) { return(new DeviceAPI() { ID = domainDevice.ID, Type = domainDevice.Type, Condition = domainDevice.Condition, Value = domainDevice.Value, Information = domainDevice.Information }); }
public void CreateDevice(DomainDevice device) { _devicesRepository.CreateDevice(device?.ToInfrastructure()); }