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))); } }
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))); } }
public void UpdateVendorType(VendorType model) { using (var uow = new LookupsUnitOfWork()) { uow.LookupsRespository.UpdateVendorType(model); uow.Save(); } }
public void UpdateOrganizationType(OrganizationType model) { using (var uow = new LookupsUnitOfWork()) { uow.LookupsRespository.UpdateOrganizationType(model); uow.Save(); } }
public void UpdateBrandType(Brand model) { using (var uow = new LookupsUnitOfWork()) { uow.LookupsRespository.UpdateBrandType(model); uow.Save(); } }
public void CreateHomeType(HomeType model) { using (var uow = new LookupsUnitOfWork()) { uow.LookupsRespository.CreateHomeType(model); uow.Save(); } }
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)); } }
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); }
public Image GetImage(Guid imageGuid) { using (var uow = new LookupsUnitOfWork()) { return(uow.LookupsRespository.GetImage(imageGuid)); } }