public async Task <Tuple <List <Main>, int> > GetList() { //ef 跟踪查询 Expression <Func <Children, bool> > where1 = x => x.Main.Telphone.Contains("11"); Expression <Func <Children, int> > orderby1 = x => x.Id; var dt = await _iChildrenRepository.Query(where1, orderby1, true, 1, 10); //更新数据 var put = dt.Item1.FirstOrDefault(); put.Name = "非跟踪更新"; await _iChildrenRepository.Update(put); Expression <Func <Main, bool> > where = x => x.Telphone.Contains("11"); Expression <Func <Main, string> > orderby = x => x.Name; var data = await Query(where, orderby, true, 1, 10); return(data); }
public IActionResult Edit(AddChildViewModel viewModel) { if (!ModelState.IsValid) { return(View(viewModel)); } _repository.Update(viewModel.Children); return(RedirectToAction("Details", "Group", new { id = viewModel.Children.GroupId })); }
public Children Update(Children updatedChildren) { return(_childrenRepository.Update(updatedChildren)); }
public long Update(Child child) { return(_childrenRepository.Update(child)); }