Server naming fixes and cleanup

Server is now completely cleaned up and without warnings
This commit is contained in:
Pavel Vesely
2020-03-15 09:38:37 +01:00
parent ab3f0853a7
commit 5b3feaf26f
92 changed files with 1223 additions and 1273 deletions

View File

@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Http;
using System;
using System.Linq;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Oqtane.Models;
using System;
using System.Linq;
namespace Oqtane.Repository
{
@ -53,7 +53,7 @@ namespace Oqtane.Repository
foreach(var item in created)
{
if (item.Entity is IAuditable entity)
if (item.Entity is IAuditable)
{
item.CurrentValues[nameof(IAuditable.CreatedBy)] = username;
item.CurrentValues[nameof(IAuditable.CreatedOn)] = date;
@ -65,13 +65,13 @@ namespace Oqtane.Repository
foreach (var item in modified)
{
if (item.Entity is IAuditable entity)
if (item.Entity is IAuditable)
{
item.CurrentValues[nameof(IAuditable.ModifiedBy)] = username;
item.CurrentValues[nameof(IAuditable.ModifiedOn)] = date;
}
if (item.Entity is IDeletable deleted && item.State != EntityState.Added)
if (item.Entity is IDeletable && item.State != EntityState.Added)
{
if ((bool)item.CurrentValues[nameof(IDeletable.IsDeleted)]
&& !item.GetDatabaseValues().GetValue<bool>(nameof(IDeletable.IsDeleted)))