public BoatService() { SailingDbContext context = new SailingDbContext(); _repositoryBoat = new BoatRepository(context); _unitOfWork = new UnitOfWork(context); AutoMapperConfiguration.Configuration(); }
/// <summary> /// pobieranie listy łódek z bazy /// </summary> /// <returns></returns> public List<BoatDto> GetBoats() { var repository=new BoatRepository(); List<Boat> list = repository.GetBoats(); return Mapper.Map<List<BoatDto>>(list); }