public static List <KlientModel> GetByTrenerId(int id) { KlientDataMapper mapper = new KlientDataMapper(); List <KlientDTO> mapperResult = new List <KlientDTO>(); mapperResult = mapper.GetAll(); mapperResult = mapperResult.Where(x => x.TrenerId == id).ToList(); List <KlientModel> result = mapperResult.Select(x => new KlientModel(x)).ToList(); return(result); }
public static void DeleteById(int id) { KlientDataMapper klientDataMapper = new KlientDataMapper(); klientDataMapper.Delete(id); }