예제 #1
0
        public IHttpActionResult Post([FromBody] Asset obj)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var res = _dbContext.Add(obj);

            return(Json(res));
        }
예제 #2
0
 public void Add(T entity)
 {
     context.Add(entity);
 }