示例#1
0
 public int Delete <T>(T entity)
 {
     if (typeof(T) == typeof(Bought))
     {
         return(_boughtController.Delete(entity as Bought));
     }
     if (typeof(T) == typeof(CompanyEndings))
     {
         return(_companyEndingsController.Delete(entity as CompanyEndings));
     }
     if (typeof(T) == typeof(CompanyNames))
     {
         return(_companyNamesController.Delete(entity as CompanyNames));
     }
     if (typeof(T) == typeof(DummyCompany))
     {
         return(_dummyCompanyController.Delete(entity as DummyCompany));
     }
     if (typeof(T) == typeof(Merchant))
     {
         return(_merchantController.Delete(entity as Merchant));
     }
     if (typeof(T) == typeof(Names))
     {
         return(_namesController.Delete(entity as Names));
     }
     if (typeof(T) == typeof(Sold))
     {
         return(_soldController.Delete(entity as Sold));
     }
     if (typeof(T) == typeof(Stock))
     {
         return(_stockController.Delete(entity as Stock));
     }
     if (typeof(T) == typeof(StockHistory))
     {
         return(_stockHistoryController.Delete(entity as StockHistory));
     }
     if (typeof(T) == typeof(StockMarket))
     {
         return(_stockMarketController.Delete(entity as StockMarket));
     }
     if (typeof(T) == typeof(Surnames))
     {
         return(_surnamesController.Delete(entity as Surnames));
     }
     if (typeof(T) == typeof(Taxes))
     {
         return(_taxesController.Delete(entity as Taxes));
     }
     return(-1);
 }