コード例 #1
0
 public static InfrastructureDevice ToInfrastructure(this DomainDevice @this)
 {
     return(new InfrastructureDevice()
     {
         Name = @this.Name,
         UserId = @this.UserId
     });
 }
コード例 #2
0
 public static DeviceModel ToDeviceModel(this DomainDevice @this)
 {
     return(new DeviceModel {
         DeviceID = @this.DeviceID,
         DeviceName = @this.DeviceName,
         UserID = @this.UserID
     });
 }
コード例 #3
0
 public static DeviceModel ToModel(this DomainDevice @this)
 {
     return(new DeviceModel()
     {
         Name = @this.Name,
         UserId = @this.UserId
     });
 }
コード例 #4
0
 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
     });
 }
コード例 #5
0
 public void CreateDevice(DomainDevice device)
 {
     _devicesRepository.CreateDevice(device?.ToInfrastructure());
 }