Skip to content

Commit f702c1e

Browse files
committed
added example for custom file name
1 parent 16dd918 commit f702c1e

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

Example/Data/Context.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Microsoft.EntityFrameworkCore;
1+
using System.IO;
2+
using Microsoft.EntityFrameworkCore;
23
using Example.Data.Entities;
34
using FileContextCore;
45

@@ -44,6 +45,8 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
4445

4546
protected override void OnModelCreating(ModelBuilder modelBuilder)
4647
{
48+
modelBuilder.Entity<User>()
49+
.ToTable("custom_user_table");
4750
}
4851
}
4952
}

FileContextCore/FileContextCore.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<SignAssembly Condition="'$(OS)' == 'Windows_NT'">true</SignAssembly>
66
<AssemblyOriginatorKeyFile>FileContextCoreCert.snk</AssemblyOriginatorKeyFile>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
8-
<Version>3.2.2</Version>
8+
<Version>3.2.3</Version>
99
<Company>morrisjdev</Company>
1010
<Authors>morrisjdev</Authors>
1111
<Description>File provider for Entity Framework Core (to be used for development purposes)</Description>
@@ -19,8 +19,8 @@
1919
<PackageProjectUrl>https://github.com/morrisjdev/FileContextCore</PackageProjectUrl>
2020
<NeutralLanguage>en-US</NeutralLanguage>
2121
<DelaySign>false</DelaySign>
22-
<AssemblyVersion>3.2.2.0</AssemblyVersion>
23-
<FileVersion>3.2.2.0</FileVersion>
22+
<AssemblyVersion>3.2.3.0</AssemblyVersion>
23+
<FileVersion>3.2.3.0</FileVersion>
2424
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2525
</PropertyGroup>
2626

FileContextCore/Storage/Internal/FileContextTable.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public FileContextTable(
5454
_options = options;
5555

5656
_rows = Init();
57-
//_rows = new Dictionary<TKey, object[]>(keyValueFactory.EqualityComparer);
5857
}
5958

6059

FileContextCore/StringHelper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ public static string GetValidFileName(this string input)
1111
{
1212
foreach (char c in Path.GetInvalidFileNameChars())
1313
{
14+
if (c == '\\' || c == '/')
15+
{
16+
continue;
17+
}
18+
1419
input = input.Replace(c, '_');
1520
}
1621

0 commit comments

Comments
 (0)