コード例 #1
0
 public AAASSOS GetById(int id)
 {
     try
     {
         using (AAASSOSRepository ASRepo = new AAASSOSRepository())
         {
             AAASSOS ASModel = new AAASSOS();
             {
                 ASModel = ASRepo.Get <AAASSOS>(id);
                 return(ASModel);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 public bool Delete(int id)
 {
     try
     {
         using (AAASSOSRepository ASRepo = new AAASSOSRepository())
         {
             var ASExisting = ASRepo.Get <AAASSOS>(id);
             if (ASExisting == null)
             {
                 return(false);
             }
             else
             {
                 ASRepo.Delete <AAASSOS>(id);
                 return(true);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }