/// <summary> /// The create drug category. /// </summary> /// <param name="category"> /// The category. /// </param> public void CreateDrugCategory(IDrugCategory category) { var cat = new DrugCategory { IsActive = true, Code = category.Code, CreatedBy = category.CreatedBy ?? Thread.CurrentPrincipal.Identity.Name, CreatedOn = DateTime.UtcNow, Description = category.Description, Name = category.Name, Status = (int)EntityStatusType.Current, SortOrder = category.SortOrder, Directions = category.Directions }; _context.DrugCategories.Add(cat); }
public static DrugCategoryViewModel ToModel(this IDrugCategory entity) { return(new DrugCategoryViewModel { CreatedBy = entity.CreatedBy, CreatedOn = entity.CreatedOn, Directions = entity.Directions, Description = entity.Description, Id = entity.Id, IsActive = entity.IsActive, Name = entity.Name, SortOrder = entity.SortOrder, Status = entity.Status, UpdatedBy = entity.UpdatedBy, UpdatedOn = entity.UpdatedOn, Code = entity.Code }); }
public void CreateDrugCategory(IDrugCategory category) { throw new NotImplementedException(); }