Ejemplo n.º 1
0
        public IHttpActionResult PosttblUser(tblUser tblUser)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            List <proc_getUserByEmail_Result> security = new List <proc_getUserByEmail_Result>();

            foreach (var item in db.proc_getUserByEmail(tblUser.Email, tblUser.Security))
            {
                security.Add(item);
            }
            if (security.Count > 0)
            {
                return(Ok("contains"));
            }
            // db.tblUsers.Add(tblUser);
            // db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = tblUser.UserID }, tblUser));
        }