public IHttpActionResult AddUserProfile([FromBody] Client value) { ClientDbHelper clientDbHelper = new ClientDbHelper(); Client clientInfo = new Client(); // //dbContext.Add(user); //dbContext.SaveChanges(); //return JsonConvert.SerializeObject("Register succesful"); clientInfo.EmailAddress = value.EmailAddress; clientInfo.FirstName = value.FirstName; clientInfo.LastName = value.LastName; clientInfo.IsMale = value.IsMale; clientInfo.Salt = Convert.ToBase64String(Common.GetRandomSalt(16)); clientInfo.Password = Convert.ToBase64String(Common.saltHashPassword(Encoding.ASCII.GetBytes(value.Password), Convert.FromBase64String(clientInfo.Salt))); try { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } clientDbHelper.AddUserProfile(clientInfo); return(Ok("Success")); } catch (Exception) { return(Ok("Something Went Wrong")); } }
public List <Client> Details(Client value) { ClientDbHelper clientDbHelper = new ClientDbHelper(); return(clientDbHelper.GetClientByID(value.EmailAddress)); }
public IEnumerable <confirmOTP> GetconfirmOTP() { ClientDbHelper claimHelper = new ClientDbHelper(); return(claimHelper.GetOTP()); }