/// <inheritdoc /> public override async Task <TConfigurationModelType> RetrieveAsync(GameConfigurationKey <TConfigType> key, CancellationToken token = default, bool includeNavigationProperties = false) { if (key == null) { throw new ArgumentNullException(nameof(key)); } return(await ModelSet.FindAsync(new object[] { key.Id, key.Config }, token)); }
/// <inheritdoc /> public override Task <PathWaypointModel> RetrieveAsync(PathWaypointKey key, bool includeNavigationProperties = false) { if (includeNavigationProperties) { throw new NotImplementedException($"TODO: Add support for nav properties for {nameof(PathWaypointModel)}"); } return(ModelSet.FindAsync(key.PathId, key.PointId)); }
public override async Task <DBRPGGroup> RetrieveAsync(int key, CancellationToken token = default, bool includeNavigationProperties = false) { if (includeNavigationProperties) { return(await ModelSet .Include(g => g.Members) .FirstAsync(g => g.Id == key, token)); } else { return(await ModelSet.FindAsync(new object[] { key }, token)); } }
/// <inheritdoc /> public virtual async Task <TModelType> RetrieveAsync(TKey key, bool includeNavigationProperties = false) { if (includeNavigationProperties) { TModelType model = await RetrieveAsync(key, false); foreach (var navigation in Context.Entry(model).Navigations) { navigation.Load(); } return(model); } else { return(await ModelSet.FindAsync(key)); } }
/// <inheritdoc /> public virtual async Task <TModelType> RetrieveAsync(TKey key, CancellationToken token = default, bool includeNavigationProperties = false) { if (includeNavigationProperties) { TModelType model = await RetrieveAsync(key, token, false); foreach (var navigation in Context.Entry(model).Navigations) { navigation.Load(); } return(model); } else { return(await ModelSet.FindAsync(new object[1] { key }, token)); } }
/// <inheritdoc /> public override Task <PathWaypointModel> RetrieveAsync(PathWaypointKey key) { return(ModelSet.FindAsync(key.PathId, key.PointId)); }