public async Task <IActionResult> Approve(int id)
        {
            TblLoginDetails login = context.TblLoginDetails.Find(id);

            login.IsApproved = "Y";
            context.SaveChanges();

            userstatus = await this.RetrieveApprovalStatus();

            return(RedirectToAction("Admin"));
        }
        public void CreateUser(Registration model)
        {
            using (var transaction = context.Database.BeginTransaction())
            {
                TblUserDetails user = new TblUserDetails {
                    Fname = model.Fname, Lname = model.Lname, EmailId = model.EmailID, Phone = Convert.ToDecimal(model.Phone), Address = model.Address
                };
                context.TblUserDetails.Add(user);
                context.SaveChanges();

                string adminchk = model.IsAdmin ? "Y" : "N";

                TblLoginDetails login = new TblLoginDetails {
                    UserName = model.EmailID, Password = model.Password, IsAdmin = adminchk, UserId = user.UserId
                };
                context.TblLoginDetails.Add(login);
                context.SaveChanges();
                transaction.Commit();
            }
        }