Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Run Topic tests
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "FullyQualifiedName~Topic" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=detailed"
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "FullyQualifiedName~Topic" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=detailed"
efcore-functional-tests:
runs-on: ubuntu-22.04
strategy:
Expand All @@ -118,8 +118,8 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Run EfCore tests
run: dotnet test src/EfCore.Ydb/test/EfCore.Ydb.FunctionalTests/EfCore.Ydb.FunctionalTests.csproj -l "console;verbosity=detailed"
- name: Run EFCore tests
run: dotnet test src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/EntityFrameworkCore.Ydb.FunctionalTests.csproj -l "console;verbosity=detailed"
integration-tests:
runs-on: ubuntu-22.04
strategy:
Expand Down
2 changes: 1 addition & 1 deletion examples/src/EF/EF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\EfCore.Ydb\src\EfCore.Ydb.csproj"/>
<ProjectReference Include="..\..\..\src\EFCore.Ydb\src\EntityFrameworkCore.Ydb.csproj"/>
</ItemGroup>
</Project>
6 changes: 4 additions & 2 deletions examples/src/EF/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using EfCore.Ydb.Extensions;
using EntityFrameworkCore.Ydb.Extensions;
using Microsoft.EntityFrameworkCore;

await using var db = new BloggingContext();
Expand All @@ -8,6 +8,7 @@

Console.WriteLine("Inserting a new blog");
db.Add(new Blog { Url = "http://blogs.msdn.com/adonet" });

await db.SaveChangesAsync();

Console.WriteLine("Querying for a blog");
Expand All @@ -30,7 +31,8 @@ internal class BloggingContext : DbContext
public DbSet<Post> Posts { get; set; }

protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseYdb("Host=localhost;Port=2136;Database=/local");
=> options.UseYdb("Host=localhost;Port=2136;Database=/local")
.LogTo(Console.WriteLine);
}

internal class Blog
Expand Down
2 changes: 1 addition & 1 deletion examples/src/EF_YC/EF_YC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\EfCore.Ydb\src\EfCore.Ydb.csproj"/>
<ProjectReference Include="..\..\..\src\EFCore.Ydb\src\EntityFrameworkCore.Ydb.csproj"/>
<ProjectReference Include="..\..\..\src\Ydb.Sdk\src\Ydb.Sdk.csproj"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion examples/src/EF_YC/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CommandLine;
using EF_YC;
using EfCore.Ydb.Extensions;
using EntityFrameworkCore.Ydb.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Ydb.Sdk.Yc;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace EfCore.Ydb.Abstractions;
namespace EntityFrameworkCore.Ydb.Abstractions;

[AttributeUsage(AttributeTargets.Property)]
public class YdbStringAttribute : Attribute;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using EfCore.Ydb.Extensions;
using EfCore.Ydb.Scaffolding.Internal;
using EntityFrameworkCore.Ydb.Extensions;
using EntityFrameworkCore.Ydb.Scaffolding.Internal;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.EntityFrameworkCore.Scaffolding;
using Microsoft.Extensions.DependencyInjection;

namespace EfCore.Ydb.Design.Internal;
namespace EntityFrameworkCore.Ydb.Design.Internal;

public class YdbDesignTimeServices : IDesignTimeServices
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Data.Common;
using Microsoft.EntityFrameworkCore.Diagnostics;

namespace EfCore.Ydb.Diagnostics.Internal;
namespace EntityFrameworkCore.Ydb.Diagnostics.Internal;

// Temporary for debugging
public class YdbCommandInterceptor : DbCommandInterceptor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore.Diagnostics;

namespace EfCore.Ydb.Diagnostics.Internal;
namespace EntityFrameworkCore.Ydb.Diagnostics.Internal;

public class YdbLoggingDefinitions : RelationalLoggingDefinitions;
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>EfCore.Ydb</RootNamespace>
<RootNamespace>EntityFrameworkCore.Ydb</RootNamespace>
<Nullable>enable</Nullable>
<PackageId>EfCore.Ydb</PackageId>
<AssemblyName>EfCore.Ydb</AssemblyName>
<PackageId>EntityFrameworkCore.Ydb</PackageId>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.Data.Common;
using EfCore.Ydb.Infrastructure;
using EfCore.Ydb.Infrastructure.Internal;
using EntityFrameworkCore.Ydb.Infrastructure;
using EntityFrameworkCore.Ydb.Infrastructure.Internal;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;

namespace EfCore.Ydb.Extensions;
namespace EntityFrameworkCore.Ydb.Extensions;

public static class YdbContextOptionsBuilderExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using EfCore.Ydb.Diagnostics.Internal;
using EfCore.Ydb.Infrastructure;
using EfCore.Ydb.Infrastructure.Internal;
using EfCore.Ydb.Metadata.Conventions;
using EfCore.Ydb.Metadata.Internal;
using EfCore.Ydb.Migrations;
using EfCore.Ydb.Migrations.Internal;
using EfCore.Ydb.Query.Internal;
using EfCore.Ydb.Storage.Internal;
using EfCore.Ydb.Update.Internal;
using EntityFrameworkCore.Ydb.Diagnostics.Internal;
using EntityFrameworkCore.Ydb.Infrastructure;
using EntityFrameworkCore.Ydb.Infrastructure.Internal;
using EntityFrameworkCore.Ydb.Metadata.Conventions;
using EntityFrameworkCore.Ydb.Metadata.Internal;
using EntityFrameworkCore.Ydb.Migrations;
using EntityFrameworkCore.Ydb.Migrations.Internal;
using EntityFrameworkCore.Ydb.Query.Internal;
using EntityFrameworkCore.Ydb.Storage.Internal;
using EntityFrameworkCore.Ydb.Update.Internal;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
Expand All @@ -18,7 +18,7 @@
using Microsoft.EntityFrameworkCore.Update;
using Microsoft.Extensions.DependencyInjection;

namespace EfCore.Ydb.Extensions;
namespace EntityFrameworkCore.Ydb.Extensions;

public static class YdbServiceCollectionExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.DependencyInjection;

namespace EfCore.Ydb.Infrastructure;
namespace EntityFrameworkCore.Ydb.Infrastructure;

public class EntityFrameworkYdbServicesBuilder(IServiceCollection serviceCollection)
: EntityFrameworkRelationalServicesBuilder(serviceCollection)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Infrastructure;

namespace EfCore.Ydb.Infrastructure.Internal;
namespace EntityFrameworkCore.Ydb.Infrastructure.Internal;

public class YdbModelValidator(
ModelValidatorDependencies dependencies,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using EfCore.Ydb.Extensions;
using EntityFrameworkCore.Ydb.Extensions;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using Ydb.Sdk.Auth;

namespace EfCore.Ydb.Infrastructure.Internal;
namespace EntityFrameworkCore.Ydb.Infrastructure.Internal;

public class YdbOptionsExtension : RelationalOptionsExtension
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Security.Cryptography.X509Certificates;
using EfCore.Ydb.Infrastructure.Internal;
using EntityFrameworkCore.Ydb.Infrastructure.Internal;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Ydb.Sdk.Auth;

namespace EfCore.Ydb.Infrastructure;
namespace EntityFrameworkCore.Ydb.Infrastructure;

public class YdbDbContextOptionsBuilder(DbContextOptionsBuilder optionsBuilder)
: RelationalDbContextOptionsBuilder<YdbDbContextOptionsBuilder, YdbOptionsExtension>(optionsBuilder)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore.Metadata.Conventions;
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;

namespace EfCore.Ydb.Metadata.Conventions;
namespace EntityFrameworkCore.Ydb.Metadata.Conventions;

// ReSharper disable once ClassNeverInstantiated.Global
public class YdbConventionSetBuilder(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Reflection;
using EfCore.Ydb.Abstractions;
using EntityFrameworkCore.Ydb.Abstractions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata.Conventions;
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;

namespace EfCore.Ydb.Metadata.Conventions;
namespace EntityFrameworkCore.Ydb.Metadata.Conventions;

public class YdbStringAttributeConvention(ProviderConventionSetBuilderDependencies dependencies)
: PropertyAttributeConventionBase<YdbStringAttribute>(dependencies)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace EfCore.Ydb.Metadata.Internal;
namespace EntityFrameworkCore.Ydb.Metadata.Internal;

public static class YdbAnnotationNames
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;

namespace EfCore.Ydb.Metadata.Internal;
namespace EntityFrameworkCore.Ydb.Metadata.Internal;

public class YdbAnnotationProvider(RelationalAnnotationProviderDependencies dependencies)
: RelationalAnnotationProvider(dependencies)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using EfCore.Ydb.Storage.Internal;
using EntityFrameworkCore.Ydb.Storage.Internal;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations.Operations;
using Microsoft.Extensions.Logging;
using Ydb.Sdk;
using Ydb.Sdk.Ado;

namespace EfCore.Ydb.Migrations.Internal;
namespace EntityFrameworkCore.Ydb.Migrations.Internal;

public class YdbHistoryRepository(HistoryRepositoryDependencies dependencies)
: HistoryRepository(dependencies), IHistoryRepository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System;
using System.Text;
using EfCore.Ydb.Metadata.Internal;
using EntityFrameworkCore.Ydb.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations.Operations;
using Ydb.Sdk.Ado;

namespace EfCore.Ydb.Migrations;
namespace EntityFrameworkCore.Ydb.Migrations;

public class YdbMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies)
: MigrationsSqlGenerator(dependencies)
Expand Down
3 changes: 3 additions & 0 deletions src/EFCore.Ydb/src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using Microsoft.EntityFrameworkCore.Design;

[assembly: DesignTimeProviderServices("EntityFrameworkCore.Ydb.Design.Internal.YdbDesignTimeServices")]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Query.SqlExpressions;

namespace EfCore.Ydb.Query.Internal.Translators;
namespace EntityFrameworkCore.Ydb.Query.Internal.Translators;

// TODO: Remove this class. Temporary stub for debug only
public class StubTranslator : IMethodCallTranslator, IMemberTranslator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using EfCore.Ydb.Utilities;
using EntityFrameworkCore.Ydb.Utilities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Query.SqlExpressions;
using Microsoft.EntityFrameworkCore.Storage;

namespace EfCore.Ydb.Query.Internal.Translators;
namespace EntityFrameworkCore.Ydb.Query.Internal.Translators;

public class YdbQueryableAggregateMethodTranslator(
YdbSqlExpressionFactory sqlExpressionFactory,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using EfCore.Ydb.Query.Internal.Translators;
using EntityFrameworkCore.Ydb.Query.Internal.Translators;
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public sealed class YdbAggregateMethodCallTranslatorProvider
: RelationalAggregateMethodCallTranslatorProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using EfCore.Ydb.Query.Internal.Translators;
using EntityFrameworkCore.Ydb.Query.Internal.Translators;
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public sealed class YdbMemberTranslatorProvider : RelationalMemberTranslatorProvider
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using EfCore.Ydb.Query.Internal.Translators;
using EntityFrameworkCore.Ydb.Query.Internal.Translators;
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public sealed class YdbMethodCallTranslatorProvider : RelationalMethodCallTranslatorProvider
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public class YdbParameterBasedSqlProcessor(
RelationalParameterBasedSqlProcessorDependencies dependencies,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public class YdbParameterBasedSqlProcessorFactory(RelationalParameterBasedSqlProcessorDependencies dependencies)
: IRelationalParameterBasedSqlProcessorFactory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public class YdbQueryCompilationContext(
QueryCompilationContextDependencies dependencies,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public class YdbQueryCompilationContextFactory(
QueryCompilationContextDependencies dependencies,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.EntityFrameworkCore.Query.SqlExpressions;
using Microsoft.EntityFrameworkCore.Storage;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public class YdbQuerySqlGenerator(QuerySqlGeneratorDependencies dependencies) : QuerySqlGenerator(dependencies)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Query;

namespace EfCore.Ydb.Query.Internal;
namespace EntityFrameworkCore.Ydb.Query.Internal;

public class YdbQuerySqlGeneratorFactory(QuerySqlGeneratorDependencies dependencies) : IQuerySqlGeneratorFactory
{
Expand Down
Loading
Loading