public async Task <IActionResult> GetSchedulesPricingById(int schedulesPricingId) { _serviceEndPoint = new ServicesEndPoint(_unitOfWork, _emailService); var result = (await _serviceEndPoint.GetSchedulesPricing()).FirstOrDefault(p => p.SchedulesPricingId == schedulesPricingId); return(Ok(result)); }
public async Task <IActionResult> GetSchedulesPricing(int schedulesPricingId = -1) { _serviceEndPoint = new ServicesEndPoint(_unitOfWork, _emailService); if (schedulesPricingId < 1) { var deal = await _serviceEndPoint.GetSchedulesPricing(); return(Ok(deal)); } else { var deal = (await _serviceEndPoint.GetSchedulesPricing()).SingleOrDefault(p => p.SchedulesPricingId == schedulesPricingId); return(Ok(deal)); } }