예제 #1
0
        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);
 }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }
예제 #5
0
 public String Post([FromBody] VaultKeep vaultKeep)
 {
     return(db.Add(vaultKeep));
 }
예제 #6
0
 public VaultKeep Post([FromBody] VaultKeep vaultkeep)
 {
     return(db.Add(vaultkeep));
 }