Example #1
0
 public ICollection <VendorType> GetVendorTypes(bool all = false)
 {
     using (var uow = new LookupsUnitOfWork()) {
         Mapper.CreateMap <VendorType, VendorType>();
         return(Mapper.Map <ICollection <VendorType>, List <VendorType> >(uow.LookupsRespository.GetVendorTypes(all)));
     }
 }
Example #2
0
 public ICollection <Brand> GetBrands(bool all = false)
 {
     using (var uow = new LookupsUnitOfWork()) {
         Mapper.CreateMap <Brand, Brand>();
         return(Mapper.Map <ICollection <Brand>, List <Brand> >(uow.LookupsRespository.GetBrands(all)));
     }
 }
Example #3
0
 public void UpdateVendorType(VendorType model)
 {
     using (var uow = new LookupsUnitOfWork()) {
         uow.LookupsRespository.UpdateVendorType(model);
         uow.Save();
     }
 }
Example #4
0
 public void UpdateOrganizationType(OrganizationType model)
 {
     using (var uow = new LookupsUnitOfWork()) {
         uow.LookupsRespository.UpdateOrganizationType(model);
         uow.Save();
     }
 }
Example #5
0
 public void UpdateBrandType(Brand model)
 {
     using (var uow = new LookupsUnitOfWork()) {
         uow.LookupsRespository.UpdateBrandType(model);
         uow.Save();
     }
 }
Example #6
0
 public void CreateHomeType(HomeType model)
 {
     using (var uow = new LookupsUnitOfWork()) {
         uow.LookupsRespository.CreateHomeType(model);
         uow.Save();
     }
 }
Example #7
0
 public ICollection <OrganizationType> GetOrganizationTypes(bool all = false)
 {
     using (var uow = new LookupsUnitOfWork()) {
         var result = uow.LookupsRespository.GetOrganizationTypes(all);
         Mapper.CreateMap <OrganizationType, OrganizationType>();
         return(Mapper.Map <ICollection <OrganizationType>, List <OrganizationType> >(result));
     }
 }
Example #8
0
        public ICollection <HomeType> GetHomeTypes(bool all = false)
        {
            var result = new List <HomeType>();

            using (var uow = new LookupsUnitOfWork()) {
                var raw = uow.LookupsRespository.GetHomeTypes(all);
                Mapper.CreateMap <HomeType, HomeType>();
                //Mapper.CreateMap<Image, Image>();
                result = Mapper.Map <ICollection <HomeType>, List <HomeType> >(raw);
            }

            return(result);
        }
Example #9
0
 public Image GetImage(Guid imageGuid)
 {
     using (var uow = new LookupsUnitOfWork()) {
         return(uow.LookupsRespository.GetImage(imageGuid));
     }
 }