Added the test button and done a bunch of testing. Almost ready !wip

This commit is contained in:
tidusjar 2018-03-22 21:30:11 +00:00
commit 11442e2ea7
13 changed files with 102 additions and 74 deletions

View file

@ -14,7 +14,7 @@ using System;
namespace Ombi.Store.Migrations
{
[DbContext(typeof(OmbiContext))]
[Migration("20180322085345_RecentlyAddedLog")]
[Migration("20180322204610_RecentlyAddedLog")]
partial class RecentlyAddedLog
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -440,6 +440,8 @@ namespace Ombi.Store.Migrations
b.Property<int>("ContentId");
b.Property<int>("ContentType");
b.Property<int>("Type");
b.HasKey("Id");

View file

@ -16,6 +16,7 @@ namespace Ombi.Store.Migrations
.Annotation("Sqlite:Autoincrement", true),
AddedAt = table.Column<DateTime>(nullable: false),
ContentId = table.Column<int>(nullable: false),
ContentType = table.Column<int>(nullable: false),
Type = table.Column<int>(nullable: false)
},
constraints: table =>

View file

@ -439,6 +439,8 @@ namespace Ombi.Store.Migrations
b.Property<int>("ContentId");
b.Property<int>("ContentType");
b.Property<int>("Type");
b.HasKey("Id");

View file

@ -40,6 +40,11 @@ namespace Ombi.Store.Repository
public async Task Update(NotificationTemplates template)
{
if (Db.Entry(template).State == EntityState.Detached)
{
Db.Attach(template);
Db.Entry(template).State = EntityState.Modified;
}
await Db.SaveChangesAsync();
}