Add function to get the tunnel flights between dates
This commit is contained in:
@@ -15,6 +15,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces
|
||||
|
||||
IEnumerable<TunnelFlight> GetTunnelFlightsByIndexes(int beginIndex, int endIndex);
|
||||
|
||||
IEnumerable<TunnelFlight> GetTunnelFlightByDates(string beginDate, string endDate);
|
||||
|
||||
void AddNewFlight(int tunnelId, TunnelFlight newFlight);
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainBusiness.Interfaces;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness
|
||||
@@ -60,6 +61,15 @@ namespace skydiveLogs_api.DomainBusiness
|
||||
return _tunnelFlightRepository.GetBetweenIndex(_identityService.ConnectedUser, beginIndex, endIndex);
|
||||
}
|
||||
|
||||
public IEnumerable<TunnelFlight> GetTunnelFlightByDates(string beginDate, string endDate)
|
||||
{
|
||||
var convertedBeginDate = Convert.ToDateTime(beginDate);
|
||||
var convertedEndDate = Convert.ToDateTime(endDate);
|
||||
|
||||
return _tunnelFlightRepository.GetBetweenDate(_identityService.ConnectedUser, convertedBeginDate, convertedEndDate);
|
||||
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
Reference in New Issue
Block a user