public ProductService(IRepository <Product> productRepository, IRepository <ProductCategory> productCategoryRepository, IMapper mapper, DatabaseContex context) { _productRepository = productRepository; _productCategoryRepository = productCategoryRepository; _mapper = mapper; _context = context; }
public UsersService(IRepository <User> userRepository, IMapper mapper, IRepository <ResetPassword> resetPasswordRepository, DatabaseContex context) { _userRepository = userRepository; _mapper = mapper; _resetPasswordRepository = resetPasswordRepository; _context = context; _passwordHasher = new PasswordHasher <User>(); }
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(); }
public BaseRepository(DatabaseContex context) { _context = context; _entities = context.Set <TEntity>(); }
public ProjectService() { _database = new DatabaseContex(); }
public MovieController(DatabaseContex context, ILogger <MovieController> logger) { _contex = context; _logger = logger; }
public HomeController() { db = new DatabaseContex(); _projectService = new ProjectService(); }