/// <summary> /// Gets the affiliation fees (clanarinas) from the database. /// </summary> /// <returns></returns> public virtual async Task<List<IClanarina>> GetAsync(ClanarinaFilter filter = null) { try { if (filter != null) { return Mapper.Map<List<IClanarina>>( await Repository.GetWhere<Clanarina>() .OrderBy(c => c.Godina) .Skip((filter.PageNumber - 1) * filter.PageSize) .Take(filter.PageSize) .ToListAsync()); } else { return Mapper.Map<List<IClanarina>>( await Repository.GetWhere<Clanarina>() .ToListAsync()); } } catch (Exception e) { throw e; } }
/// <summary> /// Gets the affiliation fees (clanarinas) from the database. /// </summary> /// <returns>The affiliation fees.</returns> public virtual Task<List<IClanarina>> GetAsync(ClanarinaFilter filter = null) { try { return Repository.GetAsync(); } catch (Exception e) { throw e; } }