public static View_ManufacturersBussinessTranscationsRepository GetView_ManufacturersBussinessTranscationsRepository(IUnitOfWork unitOfWork) { var repository = new View_ManufacturersBussinessTranscationsRepository(); repository.UnitOfWork = unitOfWork; return(repository); }
public ExecuteResultEntity <ICollection <View_ManufacturersBussinessTranscations> > QueryViewManufacturersBussinessTranscations(Guid ManufacturersId) { ExecuteResultEntity <ICollection <View_ManufacturersBussinessTranscations> > rtn; try { View_ManufacturersBussinessTranscationsRepository repo = RepositoryHelper.GetView_ManufacturersBussinessTranscationsRepository(database); var result = repo .Where(w => w.ManufacturersId == ManufacturersId) .OrderBy(p => p.Code) .ToList(); ExecuteResultEntity <ICollection <View_ManufacturersBussinessTranscations> > model = ExecuteResultEntity <ICollection <View_ManufacturersBussinessTranscations> > .CreateResultEntity(new Collection <View_ManufacturersBussinessTranscations>(result)); return(model); } catch (Exception ex) { rtn = ExecuteResultEntity <ICollection <View_ManufacturersBussinessTranscations> > .CreateErrorResultEntity(ex); return(rtn); } }