public ColumnOptionsApiModel(ColumnOptionsServiceModel model)
 {
     this.DeviceGroupId   = model.DeviceGroupId;
     this.SelectedOptions = model.SelectedOptions;
     this.ETag            = model.ETag;
     this.Key             = model.Key;
     this.CreatedBy       = model.CreatedBy;
     this.CreatedDate     = model.CreatedDate;
     this.ModifiedBy      = model.ModifiedBy;
     this.ModifiedDate    = model.ModifiedDate;
 }
Exemplo n.º 2
0
        public async Task <ColumnOptionsServiceModel> AddColumnOptionsAsync(ColumnOptionsServiceModel columnOptions, string userId)
        {
            ValueApiModel response = null;

            AuditHelper.AddAuditingData(columnOptions, userId);

            var value = JsonConvert.SerializeObject(columnOptions, Formatting.Indented, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            });

            response = await this.client.CreateAsync(ColumnOptionsCollectionId, value);

            return(this.CreateColumnOptionsServiceModel(response));
        }