public BusinessBase() { try { DB = new UAVEntities(); } catch (TimeoutException toe) { throw toe; // using (ErrorLog objError = new ErrorLog()) // objError.InsertErrorLog("BusinessBase", "TimeoutException in creating connection", toe.Message); } catch (SqlException sqle) { throw sqle; //using (ErrorLog objError = new ErrorLog()) // objError.InsertErrorLog("BusinessBase", "SqlException in creating connection", sqle.Message); } catch (Exception ex) { throw ex; //using (ErrorLog objError = new ErrorLog()) // objError.InsertErrorLog("BusinessBase", "SqlException in creating connection", sqle.Message); } }
public GenericUnit(UAVEntities Context) { context = Context; dbSet = context.Set <TEntity>(); }