Skip to content

Commit

Permalink
Extend CatalogRepositoryImpl with additional constructor (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstarzewski authored and tatarincev committed Jan 23, 2018
1 parent 005a834 commit cf4c071
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Core.Objects;
using System.Data.Entity.ModelConfiguration.Conventions;
Expand Down Expand Up @@ -27,6 +28,11 @@ public CatalogRepositoryImpl(string nameOrConnectionString, params IInterceptor[
Database.SetInitializer<CatalogRepositoryImpl>(null);
}

public CatalogRepositoryImpl(DbConnection existingConnection, IUnitOfWork unitOfWork = null,
IInterceptor[] interceptors = null) : base(existingConnection, unitOfWork, interceptors)
{
}

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="VirtoCommerce.CoreModule.Data, Version=2.24.16.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VirtoCommerce.CoreModule.Data.2.24.16\lib\net461\VirtoCommerce.CoreModule.Data.dll</HintPath>
</Reference>
Expand Down

0 comments on commit cf4c071

Please sign in to comment.