예제 #1
0
 public ProductService(IRepository <Product> productRepository,
                       IRepository <ProductCategory> productCategoryRepository, IMapper mapper, DatabaseContex context)
 {
     _productRepository         = productRepository;
     _productCategoryRepository = productCategoryRepository;
     _mapper  = mapper;
     _context = context;
 }
예제 #2
0
 public UsersService(IRepository <User> userRepository,
                     IMapper mapper,
                     IRepository <ResetPassword> resetPasswordRepository, DatabaseContex context)
 {
     _userRepository          = userRepository;
     _mapper                  = mapper;
     _resetPasswordRepository = resetPasswordRepository;
     _context                 = context;
     _passwordHasher          = new PasswordHasher <User>();
 }
예제 #3
0
 public static DatabaseContex CreateContex()
 {
     if (_db == null)
     {
         lock (_lockSync)
         {
             if (_db == null)
             {
                 _db = new DatabaseContex();
             }
         }
     }
     return(_db);
 }
        public ActionResult CallRegistration()
        {
            ViewBag.callingStartTime = DateTime.Now.ToString("h:mm:ss");

            DatabaseContex db = new DatabaseContex();
            ViewBag.callerTypes = db.CallTypes.ToList();
            ViewBag.callingStatuses = db.CallingStatuses.ToList();
            ViewBag.jobCategories = db.JobCategories.ToList();
            var employeeReginfo = _databaseContex.EmpRegInfos.FirstOrDefault(_ => _.EmpId == WebSecurity.CurrentUserId);
            if (employeeReginfo != null)
            {
                var officeId = employeeReginfo.OfficeId;
            }
            if (employeeReginfo != null) ViewBag.officeOwnerId = employeeReginfo.OfficeId;

            return View();
        }
예제 #5
0
 public BaseRepository(DatabaseContex context)
 {
     _context  = context;
     _entities = context.Set <TEntity>();
 }
예제 #6
0
 public ProjectService()
 {
     _database = new DatabaseContex();
 }
 public MovieController(DatabaseContex context, ILogger <MovieController> logger)
 {
     _contex = context;
     _logger = logger;
 }
 public HomeController()
 {
     db = new DatabaseContex();
     _projectService = new ProjectService();
 }