public ActionResult Index() { using (Repository <UserEntity> rep = new RepositoryUser()) { return(View(rep.GetAll().ToList())); } }
public HttpResponseMessage GetAll(HttpRequestMessage request) { using (RepositoryUser rep = new RepositoryUser()) { return(request.CreateResponse <ICollection <UserEntity> >(HttpStatusCode.Accepted, rep.GetAll().ToList())); } }
private void refresh() { _allUser.DataSource = RepositoryUser.GetAll(); _allUser.DataBind(); }