public ActionResult Index()
        {
            AllDb db = new AllDb();

            db.GroupDb.Insert(new Group()
            {
                GroupId = 1, Title = "Moya Gruppa"
            });
            return(View());
        }
Example #2
0
        public HomeController(Context context) : base(context)
        {
            helper = new ParseHelper(context);
            db     = new AllDb(context);

            if (!db.RoleDb.GetAll().Any())
            {
                db.RoleDb.FillRoles();
                db.UserDb.InsertAdmin();
                helper.StartParsingHtml();
            }
        }
Example #3
0
 public EFUpdateController(Context context) : base(context)
 {
     helper = new ParseHelper(context);
     db     = new AllDb(context);
     try
     {
         context.Database.EnsureDeleted();
     }
     catch (SqlException ex)
     {
         throw new Exception(ex.Message);
     }
 }
        public HomeController(CyberTrainingContext context) : base(context)
        {
            db         = new AllDb(context);
            userHelper = new UserTrackingHelper(context);

            if (!db.RoleDb.GetAll().Any())
            {
                db.GenreDb.FillGenres();
                db.GameDb.FillGames();
                db.TeamDb.CreateNewbeeTeam();
                db.RoleDb.FillRoles();
                db.UserDb.InsertAdmin();
                db.UserDb.InsertFewUsers();
                foreach (var user in db.UserDb.GetAll())
                {
                    if (db.KillDb.GetById(user.UserId) == null && user.RoleId == db.RoleDb.GetAll().First(x => x.RoleName == "Player").RoleId)
                    {
                        userHelper.SetUserSettings(user.UserId);
                    }
                }
            }
        }
 public HomeController(BookmakersContext context)
 {
     db = new AllDb(context);
 }
Example #6
0
 internal FakeRepository(Context context)
 {
     db = new AllDb(context);
 }
 internal FakeRepository(CyberTrainingContext context)
 {
     db = new AllDb(context);
 }
Example #8
0
 public BaseController(Context context)
 {
     db = new AllDb(context);
 }
 public BaseController(CyberTrainingContext context)
 {
     db = new AllDb(context);
 }
 public BaseController(ToDoTrelloContext context)
 {
     db = new AllDb(context);
 }