Skip to content

Commit 8f3176a

Browse files
committed
Custom fields added
1 parent 86bc2f9 commit 8f3176a

File tree

8 files changed

+431
-2
lines changed

8 files changed

+431
-2
lines changed

src/App/app.db

4 KB
Binary file not shown.

src/Core/Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.1</TargetFramework>
5-
<Version>2.0.2.1</Version>
5+
<Version>2.0.2.2</Version>
66
</PropertyGroup>
77

88
<ItemGroup>

src/Core/Data/AppDbContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
1313
public DbSet<Author> Authors { get; set; }
1414
public DbSet<Notification> Notifications { get; set; }
1515
public DbSet<HtmlWidget> HtmlWidtes { get; set; }
16+
public DbSet<CustomField> CustomFields { get; set; }
1617

1718
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
1819
{
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Core.Data
2+
{
3+
public class CustomField
4+
{
5+
public int Id { get; set; }
6+
public int AuthorId { get; set; }
7+
public string Name { get; set; }
8+
public string Content { get; set; }
9+
}
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace Core.Data
2+
{
3+
public interface ICustomFieldRepository : IRepository<CustomField>
4+
{
5+
}
6+
7+
public class CustomFieldRepository : Repository<CustomField>, ICustomFieldRepository
8+
{
9+
AppDbContext _db;
10+
11+
public CustomFieldRepository(AppDbContext db) : base(db)
12+
{
13+
_db = db;
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)