コード例 #1
0
 public static Contracts.ThreatCategory.ThreatCategory ToContract(this ThreatCategory dataItem)
 {
     return(new Contracts.ThreatCategory.ThreatCategory
     {
         ThreatCategoryId = dataItem.ThreatCategoryId,
         Name = dataItem.Name,
         Description = dataItem.Description,
         CreatedOn = dataItem.CreatedOn,
         UpdatedOn = dataItem.UpdatedOn,
     });
 }
コード例 #2
0
 public static void ApplyUpdate(this ThreatCategory dataItem, Contracts.ThreatCategory.UpdateThreatCategory update)
 {
     dataItem.Name        = update.Name;
     dataItem.Description = update.Description;
     dataItem.UpdatedOn   = DateTime.Now;
 }