public ActionResult Register(Registration user) { if (ModelState.IsValid) { using (HMSDbContext db = new HMSDbContext()) { //user.Category = fc["Category"]; //var NewUser = db.Registrations.Create(); //NewUser.Email = user.Email; //NewUser.Password = user.Password; db.Registrations.Add(user); db.SaveChanges(); return(RedirectToAction("LogIn", "", new { s = "Registered Succesfully" })); } } return(View(user)); }
private bool IsValid(string email, string password, string category) { bool IsValid = false; using (HMSDbContext db1 = new HMSDbContext()) { var user = db1.Registrations.FirstOrDefault(u => u.Email == email); if (user != null) { if (user.Password == password /*crypto.Compute(password,user.PasswordSalt)*/) { if (user.Category == category) { IsValid = true; } } } } return(IsValid); }
public TenureTypeDbAccess(HMSDbContext db) { this.db = db; }
public PropertyAttributeDbAccess(HMSDbContext db) { this.db = db; }
public ReservationRepository(HMSDbContext context, IMapper mapper) : base(context) { _mapper = mapper; }
public CompanyRepository(HMSDbContext context) : base(context) { }
public SystemJobDbAccess(HMSDbContext db) { this.db = db; }
public RoomRepository(HMSDbContext context) : base(context) { }
public roomrep(HMSDbContext _db) { db = _db; }
public PatientCommandHandler(HMSDbContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }
public SysUserDomin(HMSDbContext dbContext) { _dbContext = dbContext; }
public EPCRatingDbAcess(HMSDbContext db) { this.db = db; }
public RepositoryBase(HMSDbContext context) { Context = context; }
public TradeCodeDbAccess(HMSDbContext db) { this.db = db; }
public PersonRepository(HMSDbContext context) : base(context) { }
public PropertyTypeDbAccess(HMSDbContext db) { this.db = db; }
public CountryRepository(HMSDbContext context) : base(context) { }
public bookingrep(HMSDbContext _db) { db = _db; }
public GroupRepository(HMSDbContext context) : base(context) { }
public userrep(HMSDbContext _db) { db = _db; }