Пример #1
0
        public UserServicesController(ColibriDbContext colibriDbContext,
                                      HostingEnvironment hostingEnvironment,
                                      IStringLocalizer <UserServicesController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;

            // initialize the Constructor with the UserServicesViewModel
            UserServicesViewModel = new UserServicesViewModel()
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                UserServices   = new List <UserServices>(),
                Users          = new List <ApplicationUser>()
            };

            // initialize the Constructor with the UserServicesAddToEntityViewModel
            UserServicesAddToEntityViewModel = new UserServicesAddToEntityViewModel()
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                UserServices   = new Models.UserServices()
            };

            // UserServicesRatingModel
            UserServicesRatingViewModel = new UserServicesRatingViewModel()
            {
                UserServices      = new List <UserServicesRatings>(),
                UserServiceRating = new Models.UserServicesRatings(),
                Users             = new List <ApplicationUser>()
            };
        }
Пример #2
0
        public UserServicesRatingController(ColibriDbContext colibriDbContext,
                                            IStringLocalizer <UserServicesRatingController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            UserServicesRatingViewModel = new UserServicesRatingViewModel()
            {
                UserServices      = new List <UserServicesRatings>(),
                UserServiceRating = new Models.UserServicesRatings(),
                Users             = new List <ApplicationUser>()
            };
        }