public OfficeClass Get(int Id) { using (WaecDirDbEntities db = new WaecDirDbEntities()) { return(db.OfficeClasses.FirstOrDefault(o => o.Id == Id)); } }
public IEnumerable <OfficeClass> Get() { using (WaecDirDbEntities db = new WaecDirDbEntities()) { return(db.OfficeClasses.ToList()); } }