コード例 #1
0
 private static string GetQueryable(string queryable, IGenericUnitOfWork generalRepository, KendoDataRequest kendoDataRequest, out int total,
                                    bool hasWhereClause)
 {
     queryable = Filter(queryable, kendoDataRequest.Filter, kendoDataRequest.DataExtensions, hasWhereClause);
     total     = generalRepository.SqlQuery <int>("select count(*) from(" + queryable + ") a").FirstOrDefault();
     return(queryable);
 }
コード例 #2
0
 public DnaClientDomain(
     IDatabaseUnitOfWork database,
     IGenericUnitOfWork <UserDnaClient> userDnaDatabase)
 {
     Database        = database;
     UserDnaDatabase = userDnaDatabase;
 }
コード例 #3
0
 public CalendarService(
     IGenericUnitOfWork genericUnitOfWork,
     ApplicationLogService applicationLogService, IDiObjectMapper mapper)
 {
     _genericUnitOfWork     = genericUnitOfWork;
     _applicationLogService = applicationLogService;
     _mapper = mapper;
 }
コード例 #4
0
ファイル: UnitsUpdateTest.cs プロジェクト: Aviatore/koop
        public void Setup()
        {
            var mapperConfig = new MapperConfiguration(m =>
            {
                m.AddProfile(new MappingProfiles());
            });
            IMapper mapper = mapperConfig.CreateMapper();

            _uow = new GenericUnitOfWork(new KoopDbContext(), mapper, null);
        }
コード例 #5
0
 public ITService(
     IGenericUnitOfWork genericUnitOfWork, IDiObjectMapper mapper,
     ISetUpService setupService, IEmailComposer emailComposer
     )
 {
     _genericUnitOfWork = genericUnitOfWork;
     _mapper            = mapper;
     _setupService      = setupService;
     _emailComposer     = emailComposer;
 }
コード例 #6
0
 public PettyCashService(
     ISetUpService setupService,
     ISharedService sharedService, IEmailComposer emailComposer,
     IDiObjectMapper objectMapper, IGenericUnitOfWork genericUnitOfWork)
 {
     _setupService      = setupService;
     _sharedService     = sharedService;
     _emailComposer     = emailComposer;
     _objectMapper      = objectMapper;
     _genericUnitOfWork = genericUnitOfWork;
 }
コード例 #7
0
 public CITService(
     IGenericUnitOfWork genericUnitOfWork,
     IDiObjectMapper mapper,
     IEmailComposer emailComposer, ISharedService sharedService
     )
 {
     _genericUnitOfWork = genericUnitOfWork;
     _emailComposer     = emailComposer;
     _mapper            = mapper;
     _sharedService     = sharedService;
 }
コード例 #8
0
        public AocaService(IGenericUnitOfWork genericUnitOfWork,
                           ISharedService sharedService, IListService listService,
                           ISetUpService setupService,

                           IEmailComposer emailComposer, IDiObjectMapper mapper)
        {
            _listService   = listService;
            _sharedService = sharedService;

            _emailComposer     = emailComposer;
            _setupService      = setupService;
            _mapper            = mapper;
            _genericUnitOfWork = genericUnitOfWork;
        }
コード例 #9
0
 public BOCAService(IGenericUnitOfWork genericUnitOfWork,
                    ISharedService sharedService,
                    IListService listService,
                    ISetUpService setupService,
                    IEmailComposer emailComposer,
                    ApplicationLogService applicationLogService,
                    IDiObjectMapper mapper)
 {
     _genericUnitOfWork     = genericUnitOfWork;
     _sharedService         = sharedService;
     _listService           = listService;
     _setupService          = setupService;
     _emailComposer         = emailComposer;
     _applicationLogService = applicationLogService;
     _mapper = mapper;
 }
コード例 #10
0
        public static DataSourceResult ToDataSourceResult <T>(this IGenericUnitOfWork generalRepository, string queryable, KendoDataRequest kendoDataRequest,
                                                              Sort initialsort, QueryType queryType = QueryType.None)
        {
            int total;

            if (queryType == QueryType.NeedToWrapBySelect)
            {
                queryable = $"select * from ({queryable}) wrapped";
            }
            string filteredQuery = GetQueryable(queryable, generalRepository, kendoDataRequest, out total, queryType == QueryType.AlreadyHasWhereClause);

            queryable = Page(filteredQuery, kendoDataRequest.Take, kendoDataRequest.Skip, kendoDataRequest.Sort, initialsort, kendoDataRequest.DataExtensions);
            var data = generalRepository.SqlQuery <T>(queryable).ToList();

            return(new DataSourceResult()
            {
                Data = data,
                Total = total
            });
        }
コード例 #11
0
 // GET: Customer
 public ActionResult Index()
 {
     genericUnitOfWork = new GenericUnitOfWork <CustomerEntity>();
     return(View(genericUnitOfWork.GetRepository().GetAllRecordsWithoutTracking()));
 }
コード例 #12
0
 public UserService(IGenericUnitOfWork <TwitterLikeDbContext> uow)
 {
     unitOfWork = uow;
     users      = unitOfWork.GetRepository <User>();
 }
コード例 #13
0
ファイル: OrderController.cs プロジェクト: Aviatore/koop
 public OrderController(IGenericUnitOfWork uow, IMapper mapper)
 {
     _uow    = uow;
     _mapper = mapper;
 }
コード例 #14
0
 public GenericRepository(IGenericUnitOfWork <EthioProductEntities> unitOfWork)
     : this(unitOfWork.Context)
 {
 }
コード例 #15
0
 public HomeController(IGenericUnitOfWork uow, IHostingEnvironment hostEnvironment)
 {
     _uow             = uow;
     _hostEnvironment = hostEnvironment;
 }
コード例 #16
0
        //private IRepository<tblProduct> repoProduct;
        //private IShoppingCart shoppingCart;


        public PaymentController(IGenericUnitOfWork <EthioProductEntities> _uow)
        {
            uow = _uow;
        }
コード例 #17
0
ファイル: CooperatorController.cs プロジェクト: Aviatore/koop
 public CooperatorController(IGenericUnitOfWork uow, IMapper mapper)
 {
     _uow    = uow;
     _mapper = mapper;
 }
コード例 #18
0
ファイル: AuthController.cs プロジェクト: Aviatore/koop
 public AuthController(IGenericUnitOfWork genericUnitOfWork, ILogger <AuthController> logger)
 {
     _uow    = genericUnitOfWork;
     _logger = logger;
 }
コード例 #19
0
 public ListService(
     IDiObjectMapper mapper, IGenericUnitOfWork genericUnitOfWork)
 {
     _mapper            = mapper;
     _genericUnitOfWork = genericUnitOfWork;
 }
コード例 #20
0
ファイル: ProductController.cs プロジェクト: Aviatore/koop
 public ProductController(IGenericUnitOfWork uow, IMapper mapper)
 {
     _uow    = uow;
     _mapper = mapper;
 }
コード例 #21
0
ファイル: CategoryController.cs プロジェクト: Aviatore/koop
 public CategoryController(IGenericUnitOfWork uow, IMapper mapper)
 {
     _uow    = uow;
     _mapper = mapper;
 }
コード例 #22
0
 public GenericRepository(IGenericUnitOfWork unitOfWork)
 {
     _unitOfWork = unitOfWork;
 }
コード例 #23
0
 public TestController(IGenericUnitOfWork genericUnitOfWork, IMyEmailSender emailSender)
 {
     _uow         = genericUnitOfWork;
     _emailSender = emailSender;
 }
コード例 #24
0
 public UpdateProductCommandHandler(IProductRepositoryAsync productRepository, IGenericUnitOfWork unitOfWork)
 {
     _productRepository = productRepository;
     _unitOfWork        = unitOfWork;
 }
コード例 #25
0
 public ApplicationLogService(IDiObjectMapper objectMapper, IGenericUnitOfWork genericUnitOfWork)
 {
     _objectMapper      = objectMapper;
     _genericUnitOfWork = genericUnitOfWork;
 }
コード例 #26
0
 public ServiceProductCategory(IGenericUnitOfWork genericUnitOfWork)
 {
     _genericUnitOfWork = genericUnitOfWork;
 }
コード例 #27
0
 public ErrorLogService(IDiObjectMapper objectMapper, IGenericUnitOfWork genericUnitOfWork)
 {
     _objectMapper      = objectMapper;
     _genericUnitOfWork = genericUnitOfWork;
 }
コード例 #28
0
 public EntityService(IGenericUnitOfWork unitOfWork, IGenericRepository <T> repository)
 {
     _unitOfWork = unitOfWork;
     _repository = repository;
 }
コード例 #29
0
 public ParttimerService(IDiObjectMapper objectMapper, IGenericUnitOfWork genericUnitOfWork, IEmailComposer emailComposer)
 {
     _objectMapper      = objectMapper;
     _genericUnitOfWork = genericUnitOfWork;
     _emailComposer     = emailComposer;
 }
コード例 #30
0
 public CreateProductCommandHandler(IProductRepositoryAsync productRepository, IGenericUnitOfWork unitOfWork, IMapper mapper)
 {
     _productRepository = productRepository;
     _unitOfWork        = unitOfWork;
     _mapper            = mapper;
 }