public IHttpActionResult Post([FromBody] Asset obj) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var res = _dbContext.Add(obj); return(Json(res)); }
public void Add(T entity) { context.Add(entity); }