コード例 #1
0
    protected override ValidationResult IsValid(object value, ValidationContext validationContext)
    {
        var context = new MhotivoContext();

        if (value != null)
        {
            var email = (string)value;
            if (context.Users.FirstOrDefault(x => x.Email == emailValue) != null)
            {
                return(new ValidationResult(FormatErrorMessage(email)));
            }
        }
        return(ValidationResult.Success);
    }
コード例 #2
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     WebApiConfig.Register(GlobalConfiguration.Configuration);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     AuthConfig.RegisterAuth();
     AutoMapperConfiguration.Configure();
     Database.SetInitializer(new MigrateDatabaseToLatestVersion <MhotivoContext, Implement.Migrations.Configuration>());
     using (var context = new MhotivoContext())
     {
         context.Database.Initialize(force: true);
     }
 }
コード例 #3
0
ファイル: Global.asax.cs プロジェクト: armejiaf/Mhotivo
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     WebApiConfig.Register(GlobalConfiguration.Configuration);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     AuthConfig.RegisterAuth();
     AutoMapperConfiguration.Configure();
     Database.SetInitializer(new MigrateDatabaseToLatestVersion<MhotivoContext, Implement.Migrations.Configuration>());
     using (var context = new MhotivoContext())
     {
         context.Database.Initialize(force: true);
     }
 }
コード例 #4
0
ファイル: Global.asax.cs プロジェクト: erickdc/Portal-Mhotivo
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AutoMapperConfiguration.Configure();
            var binder = new DateTimeModelBinder("MM/dd/yyyy");

            ModelBinders.Binders.Add(typeof(DateTime), binder);
            ModelBinders.Binders.Add(typeof(DateTime?), binder);
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <MhotivoContext, Implement.Migrations.Configuration>());
            using (var context = new MhotivoContext())
            {
                context.Database.Initialize(true);
            }
        }
コード例 #5
0
 public AcademicYearRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #6
0
ファイル: EnrollRepository.cs プロジェクト: armejiaf/Mhotivo
 public EnrollRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #7
0
ファイル: StudentRepository.cs プロジェクト: erickdc/Mhotivo
 public StudentRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #8
0
ファイル: EnrollRepository.cs プロジェクト: erickdc/Mhotivo
 public EnrollRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #9
0
 public PreloadedPasswordsGenerationService(MhotivoContext ctx)
 {
     _context = ctx;
     UpdateList();
 }
コード例 #10
0
ファイル: ParentRepository.cs プロジェクト: armejiaf/Mhotivo
 public ParentRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #11
0
 public AcademicYearRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #12
0
 public TutorRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #13
0
 public PreloadedPasswordsGenerationService(MhotivoContext ctx)
 {
     _context = ctx;
     UpdateList();
 }
コード例 #14
0
 public BenefactorRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #15
0
 public NotificationCommentRepository(MhotivoContext context)
 {
     _context = context;
 }
コード例 #16
0
 public ClassActivityRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #17
0
 public HomeworkRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #18
0
ファイル: MeisterRepository.cs プロジェクト: armejiaf/Mhotivo
 public MeisterRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #19
0
 public SliderRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #20
0
ファイル: GradeRepository.cs プロジェクト: erickdc/Mhotivo
 public GradeRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #21
0
 public NotificationRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #22
0
 public HomeworkRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #23
0
 public EducationLevelRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #24
0
 public BenefactorRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #25
0
 public NotificationRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #26
0
 public TeacherRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #27
0
 public EducationLevelRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #28
0
ファイル: UserRepository.cs プロジェクト: armejiaf/Mhotivo
 public UserRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #29
0
 public AcademicGradeRepository(MhotivoContext context)
 {
     _context = context;
 }
コード例 #30
0
 public PensumRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #31
0
ファイル: GradeRepository.cs プロジェクト: armejiaf/Mhotivo
 public GradeRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #32
0
ファイル: ContactRepository.cs プロジェクト: erickdc/Mhotivo
 public ContactInformationRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #33
0
ファイル: PensumRepository.cs プロジェクト: armejiaf/Mhotivo
 public PensumRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #34
0
 public AppointmentDiaryRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #35
0
        private readonly IEducationLevelRepository _areaRepository; //Could this be needed in the future?

        public CourseRepository(MhotivoContext ctx, IEducationLevelRepository areaRepository)
        {
            _context        = ctx;
            _areaRepository = areaRepository;
        }
コード例 #36
0
 public ClassActivityRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #37
0
ファイル: TeacherRepository.cs プロジェクト: armejiaf/Mhotivo
 public TeacherRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #38
0
 public PeopleWithUserRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #39
0
 public PrivilegeRepository(MhotivoContext context)
 {
     _context = context;
 }
コード例 #40
0
 public CourseRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #41
0
 public NotificationCommentRepository(MhotivoContext context)
 {
     _context = context;
 }
コード例 #42
0
ファイル: PeopleRepository.cs プロジェクト: erickdc/Mhotivo
 public PeopleRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }
コード例 #43
0
ファイル: MeisterRepository.cs プロジェクト: erickdc/Mhotivo
 public MeisterRepository(MhotivoContext ctx)
 {
     _context = ctx;
 }