public int Add(T obj) { var retId = _dao.Add(obj); _dao.SaveData(); return(retId); }
public virtual IConveyorSingleResultBuilder <T> Add(T entity) { var conveyorSingleResultBuilder = _dao.Add(entity); conveyorSingleResultBuilder.SetServiceMessage("Ok"); return(conveyorSingleResultBuilder); }
// POST api/blog public HttpResponseMessage saveBlog(blog blogdetail) { HttpResponseMessage response = null; //新增blog if (HttpContext.Current.Session["userId"] == null && blogdetail.UserId == 0) { response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } else { int id = int.Parse((HttpContext.Current.Session["userId"].ToString())); blogdetail.UserId = id; Blog.Add(blogdetail); response = Request.CreateResponse(HttpStatusCode.Created); return(response); } }
public string Add(ListServices t) { var res = _dao.Add(t); return(res >= 0 ? $"Было добавлено {res} строк." : "Произошла ошибка при добавлении."); }
public bool Insert(Product obj) { return(dao.Add(obj)); }
public Response <User> Add(User item) { var result = _dao.Add(item); return(GetResponse(result)); }
public string Add(FloatCounter t) { var res = _dao.Add(t); return(res >= 0 ? $"Было добавлено {res} строк." : "Произошла ошибка при добавлении."); }
public string Add(ManageCompany t) { var res = _dao.Add(t); return(res >= 0 ? $"Было добавлено {res} строк." : "Произошла ошибка при добавлении."); }
public string Add(District district) { var res = _districtDao.Add(district); return(res >= 0 ? $"Было добавлено {res} строк." : "Произошла ошибка при добавлении."); }