Beispiel #1
0
 public void TestMethod1()
 {
     try
     {
         var repo    = new FeatureRepo();
         var uow     = new PDSDBUnitOfWork();
         var feature = new Feature
         {
             Id = 0,
             //ClinicalCategoryId = 0,
             GroupId     = 1,
             TypeId      = 1,
             Name        = "feature 3",
             Description = "F 3",
             UpdatedOn   = DateTime.Now,
             CreatedOn   = DateTime.Now,
             Items       = new List <FeatureItem>
             {
                 //new FeatureItem { ItemId = 2,
                 //                    UpdatedOn = DateTime.Now,
                 //                    CreatedOn = DateTime.Now
                 //}
             }
         };
         repo.Add(feature);
         uow.SaveChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public IEnumerable <FeatureWithValueDto> GetProductFeatureWithValues(int productId)
 {
     using (var cxt = DbContext(DbOperation.Read))
     {
         var repo = new FeatureRepo(cxt);
         return(repo.GetProductFeatureWithValues(productId));
     }
 }
Beispiel #3
0
 public FeatureSerivce()
 {
     _repo = new FeatureRepo();
 }