Compare commits
No commits in common. "68c82686344e882fcd8c144d91faaec4d4ec657e" and "4af9e80a5fa48386eef9ea10e661cbc79156573a" have entirely different histories.
68c8268634
...
4af9e80a5f
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using AyCode.Database.Extensions;
|
||||||
using AyCode.Interfaces.TimeStampInfo;
|
using AyCode.Interfaces.TimeStampInfo;
|
||||||
|
|
||||||
namespace AyCode.Database.DbContexts;
|
namespace AyCode.Database.DbContexts;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
using AyCode.Interfaces.Entities;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
|
|
||||||
namespace AyCode.Database.DbContexts;
|
|
||||||
|
|
||||||
public interface IAcEntityTypeConfiguration<TEntity> : IEntityTypeConfiguration<TEntity> where TEntity : class, IEntity
|
|
||||||
{ }
|
|
||||||
|
|
@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
namespace AyCode.Database.DbContexts
|
namespace AyCode.Database.Extensions
|
||||||
{
|
{
|
||||||
public static class AcDbContextExtension
|
public static class AcDbContextExtension
|
||||||
{
|
{
|
||||||
|
|
@ -52,7 +52,7 @@ namespace AyCode.Database.DbContexts
|
||||||
|
|
||||||
foreach (var prop in originalValues.Properties)
|
foreach (var prop in originalValues.Properties)
|
||||||
{
|
{
|
||||||
if (Equals(originalValues[prop.Name], currentValues[prop.Name]) == false)
|
if (object.Equals(originalValues[prop.Name], currentValues[prop.Name]) == false)
|
||||||
{
|
{
|
||||||
yield return prop;
|
yield return prop;
|
||||||
}
|
}
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
using AyCode.Interfaces.Users;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
||||||
|
|
||||||
namespace AyCode.Database.ModelBuilders.Users;
|
|
||||||
|
|
||||||
public static class AcUserEntityTypeBuilderExtensions
|
|
||||||
{
|
|
||||||
public static void BuildUserToProfileRelation<TUser>(this EntityTypeBuilder<TUser> modelBuilder) where TUser : class, IUserBase
|
|
||||||
{
|
|
||||||
//throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void BuildUserToAddressRelation<TUser>(this EntityTypeBuilder<TUser> modelBuilder) where TUser : class, IUserBase
|
|
||||||
{
|
|
||||||
//throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
using AyCode.Database.DbContexts;
|
|
||||||
using AyCode.Interfaces.Users;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
||||||
|
|
||||||
namespace AyCode.Database.ModelBuilders.Users;
|
|
||||||
|
|
||||||
public abstract class AcUserEntityTypeDefaultConfiguration<TUser> : IAcEntityTypeConfiguration<TUser> where TUser : class, IUserBase
|
|
||||||
{
|
|
||||||
public virtual void Configure(EntityTypeBuilder<TUser> modelBuilder)
|
|
||||||
{
|
|
||||||
modelBuilder.BuildUserToProfileRelation();
|
|
||||||
modelBuilder.BuildUserToAddressRelation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -6,13 +6,12 @@ using AyCode.Interfaces.ServiceProviders;
|
||||||
namespace AyCode.Entities.ServiceProviders
|
namespace AyCode.Entities.ServiceProviders
|
||||||
{
|
{
|
||||||
[Table("ServiceProviders")]
|
[Table("ServiceProviders")]
|
||||||
public abstract class ServiceProviderBase : IServiceProviderBase
|
public class ServiceProviderBase : IServiceProviderBase
|
||||||
{
|
{
|
||||||
protected ServiceProviderBase() { }
|
public ServiceProviderBase() { }
|
||||||
|
|
||||||
protected ServiceProviderBase(string name, Guid ownerId ) : this(Guid.NewGuid(), name, ownerId) { }
|
public ServiceProviderBase(string name, Guid ownerId ) : this(Guid.NewGuid(), name, ownerId) { }
|
||||||
|
public ServiceProviderBase(Guid id, string name, Guid ownerId) : this()
|
||||||
protected ServiceProviderBase(Guid id, string name, Guid ownerId) : this()
|
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
Name = name;
|
Name = name;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue