Ejemplo n.º 1
0
        public async Task InitAsync(University university, ApplicationDbContext dbContex)
        {
            Id               = university.Id;
            Name             = university.Name;
            ShortName        = university.ShortName;
            Color            = university.Color;
            LogoPath         = university.logo;
            Page             = university.Page;
            CreateDateTime   = university.CreateDateTime;
            ModifiedDateTime = university.ModifiedDateTime;

            Divisions = new DivisionsListViewModel();
            Divisions.UniversityId = Id;
            Divisions.Page         = DivisionsPage == 0 ? 1: DivisionsPage;
            await Divisions.InitAsync(dbContex);
        }
        public async Task <IActionResult> Index(DivisionsListViewModel model)
        {
            await model.InitAsync(_dbContext);

            return(View(model));
        }