private List <Boat> GetAllBoats() { using (var context = new BoatContext()) { var service = new BoatService(context); var boats = service.GetAll(); return(boats.ToList()); } }
private void LoadBoatList() { BoatObservableList = new ObservableCollection <Boat>(boatService.GetAll()); }