Пример #1
0
        public static bool CheckDatabase()
        {
            using (var context = new ControllerModel())
            {
                try
                {
                    context.Database.CreateIfNotExists();
                    if (!RoleController.checkRole())
                    {
                        RoleController.AddRoles();
                    }

                    return(true);
                }
                catch (Exception ex)
                {
                    return(false);
                }
            }
        }