예제 #1
0
 public Vault Post([FromBody] Vault vault)
 {
     if (ModelState.IsValid)
     {
         return(db.Add(vault));
     }
     return(null);
 }
예제 #2
0
 public Vault AddVault([FromBody] Vault vault)
 {
     if (ModelState.IsValid)
     {
         return(_repo.Add(vault));
     }
     return(null);
 }
예제 #3
0
        public Vault Post([FromBody] Vault vault)
        {
            var user = HttpContext.User.Identity.Name;
            int Id;

            int.TryParse(user, out Id);
            vault.UserId = Id;
            return(db.Add(vault));
        }
예제 #4
0
        [HttpPost]//one Vault
        public Vault AddVault([FromBody] Vault vault)
        {
            var user = HttpContext.User;
            var id   = user.Identity.Name;

            vault.UserId = id;
            if (ModelState.IsValid)
            {
                return(_repo.Add(vault));
            }
            return(null);
        }
예제 #5
0
 public Vault Post([FromBody] Vault vault)
 {
     return(db.Add(vault));
 }