Exemplo n.º 1
0
        public virtual IHttpActionResult PostPut(TEntity obj)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            //db.obj.Add(obj);
            //db.SaveChanges();
            objDb.AddUpdate(obj, obj.PkName);

            return(CreatedAtRoute("DefaultApi", new { id = this.GetPkValue(obj) }, obj));
        }