Exemplo n.º 1
0
 public ManageSitesController(DataContext dataContext, IMapper mapper)
 {
     _dataContext = dataContext;
     _mapper      = mapper;
     _unitofwork  = new unitofwork(_dataContext);
     _unitofwork.website.GetMapper(_mapper);
 }
Exemplo n.º 2
0
        public HomeControllerTest()
        {
            employee1 = new EmployeesModel {
                ID = 1, First_Name = "Sweety", Last_Name = "Sharma", Email = "*****@*****.**", Dob = Convert.ToDateTime("12/12/1973"), Gender = "Female", Address = "New Link Road", City = "Saran", State = "MHS", Pin = "1231"
            };
            employee2 = new EmployeesModel {
                ID = 2, First_Name = "Jatin", Last_Name = "Kumar", Email = "*****@*****.**", Dob = Convert.ToDateTime("12/12/1972"), Gender = "Male", Address = "New Link Road", City = "Saran", State = "MHS", Pin = "1231"
            };
            employee3 = new EmployeesModel {
                ID = 3, First_Name = "Sweta", Last_Name = "shah", Email = "*****@*****.**", Dob = Convert.ToDateTime("12/12/1971"), Gender = "Female", Address = "New Link Road", City = "Saran", State = "MHS", Pin = "1231"
            };
            employee4 = new EmployeesModel {
                ID = 4, First_Name = "yasmin", Last_Name = "Sheikh", Email = "*****@*****.**", Dob = Convert.ToDateTime("12/12/1978"), Gender = "Female", Address = "New Link Road", City = "Saran", State = "MHS", Pin = "1231"
            };
            employee5 = new EmployeesModel {
                ID = 5, First_Name = "weetetar", Last_Name = "Rao", Email = "*****@*****.**", Dob = Convert.ToDateTime("12/12/1975"), Gender = "Male", Address = "New Link Road", City = "Saran", State = "MHS", Pin = "1231"
            };

            employeeModelList = new List <EmployeesModel>
            {
                employee1,
                employee2,
                employee3,
                employee4
            };

            employeeRepository = new DummyEmployeeRepository(employeeModelList);
            unitofwork         = new unitofwork(employeeRepository);
            controller         = new EmployeeController(unitofwork);
        }
Exemplo n.º 3
0
 public AdminController(DataContext dataContext, UserManager <User> userManager, IMapper mapper)
 {
     _dataContext = dataContext;
     _usermanager = userManager;
     _mapper      = mapper;
     _unitofwork  = new unitofwork(_dataContext);
     _unitofwork.admin.GetMapper(_mapper);
 }
        public MangeReviews(DataContext dataContext, IMapper mapper, IHubContext <BroadCast> hubcontext)
        {
            _dataContext = dataContext;

            _mapper = mapper;

            _hubcontext = hubcontext;

            _unitofwork = new unitofwork(_dataContext);

            _unitofwork.reviews.GetMapper(_mapper);

            _unitofwork.reviews.Inithub(hubcontext);
        }
Exemplo n.º 5
0
 public EmployeeController(unitofwork uow)
 {
     this.unitofWork = uow;
 }
Exemplo n.º 6
0
 public HomeController(unitofwork uow)
 {
     this.unitofWork = uow;
 }