fixes
This commit is contained in:
@@ -39,7 +39,7 @@ namespace zero.Core.Database
|
||||
/// <inheritdoc />
|
||||
public void Run(DocumentConventions conventions)
|
||||
{
|
||||
conventions.MaxNumberOfRequestsPerSession = 100;
|
||||
conventions.MaxNumberOfRequestsPerSession = 1000;
|
||||
conventions.IdentityPartsSeparator = IdentityPartsSeparator;
|
||||
conventions.TransformTypeCollectionNameToDocumentIdPrefix = TransformTypeCollectionNameToDocumentIdPrefix;
|
||||
conventions.FindCollectionName = FindCollectionName;
|
||||
|
||||
@@ -62,6 +62,10 @@ namespace zero.Core.Routing
|
||||
|
||||
foreach (T model in models)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string routeId = GetRouteId(model, parameters);
|
||||
routeIds.Add(routeId);
|
||||
routeMap.TryAdd(routeId, model);
|
||||
|
||||
@@ -106,7 +106,14 @@ namespace zero.Core.Routing
|
||||
return new();
|
||||
}
|
||||
|
||||
Type type = models.First().GetType();
|
||||
T firstExistingModel = models.FirstOrDefault(x => x != null);
|
||||
|
||||
if (firstExistingModel == null)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
||||
Type type = firstExistingModel.GetType();
|
||||
IRouteProvider routeProvider = Providers.FirstOrDefault(x => x.AffectedTypes.Any(t => t.IsAssignableFrom(type)));
|
||||
|
||||
if (routeProvider == null)
|
||||
|
||||
Reference in New Issue
Block a user