public DriverDataContract AuthenticateAsDriver(DriverAuthenticationRequestDataContract request) { IDriverInfo driverInfo = _server.CreateDriverInfo(); ConvertHelper.FillDriverAuthenticationRequestInfo(driverInfo, request); _server.AuthenticateAsDriver(driverInfo, request.CityId); return(ConvertHelper.CreateDriverDataContract(driverInfo)); }
public IEnumerable <DriverDataContract> EnumerateDrivers(Guid cityId) { ICityLogic city = _server.Cities.FirstOrDefault(c => c.Info.Id == cityId); return(cityId == null ? new DriverDataContract[0] : city.Drivers.Select(d => ConvertHelper.CreateDriverDataContract(d)).ToArray()); }