public VaultKeep Post([FromBody] VaultKeep vaultKeep) { var user = HttpContext.User; var id = Int32.Parse(user.Identity.Name); vaultKeep.UserId = id; return(db.Add(vaultKeep)); }
public VaultKeep Post([FromBody] VaultKeep vaultKeep) { if (ModelState.IsValid) { return(db.Add(vaultKeep)); } return(null); }
public VaultKeep Post([FromBody] VaultKeep vaultkeep) { var user = HttpContext.User.Identity.Name; int Id; int.TryParse(user, out Id); vaultkeep.UserId = Id; return(db.Add(vaultkeep)); }
public VaultKeep Post([FromBody] VaultKeep VaultKeep) { var user = HttpContext.User; var id = user.Identity.Name; UserReturnModel activeUser = null; if (id != null) { activeUser = userDb.GetUserById(id); } VaultKeep.UserId = activeUser.Id; return(vaultKeepDb.Add(VaultKeep)); }
public String Post([FromBody] VaultKeep vaultKeep) { return(db.Add(vaultKeep)); }
public VaultKeep Post([FromBody] VaultKeep vaultkeep) { return(db.Add(vaultkeep)); }