public static Sector GetAdapted(int IdSector) { Sector sector = null; try { SectorAdapter adapter = new SectorAdapter(SectorFacade.Select(IdSector)); Sector _object = new Sector(); adapter.Fill(_object); sector = _object; } catch (ExceptionDAL dalex) { throw new ExceptionBLL(dalex, dalex.Message); } return(sector); }
public static List <Sector> GetAllAdapted() { List <Sector> lista = null; try { SectorCollectionAdapter adapter = new SectorCollectionAdapter(SectorFacade.SelectAll()); List <Sector> collection = new List <Sector>(); adapter.Fill(collection); lista = collection; return(lista); } catch (ExceptionDAL dalex) { throw new ExceptionBLL(dalex, dalex.Message); } }