コード例 #1
0
 /// <summary>
 ///  Belirtilen Primary Key değeri için Entity döndürür. Primary Key'e bağlı Entity bulamazsa ve id değeri geçersizse null değer döndürür.
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public virtual T Find(int?id)
 {
     try
     {
         return(_repository.Get(id));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #2
0
 public ActionResult Delete(int id)
 {
     rep.Delete(rep.Get(id));
     return(new HttpStatusCodeResult(System.Net.HttpStatusCode.OK));
 }