Пример #1
0
 public void RepositoryDel()
 {
     repository.Delete(new Dog
     {
         Id = "58087dd7ebb9191be8f144d9"
     });//只支持主键删除
 }
Пример #2
0
 public ActionResult Delete(int id)
 {
     userRepository.Delete(new UserInfo {
         Id = id
     });
     userExtRepository.Delete(new UserExtension {
         Id = id
     });
     return(RedirectToAction("Index"));
 }