Compare commits
No commits in common. "4840aedba479a33d8a17b2630f073d61af713aa3" and "17eced9a2e5b8c341bc9dc5a9c1a18e9f1db9ecc" have entirely different histories.
4840aedba4
...
17eced9a2e
|
|
@ -13,15 +13,12 @@ public abstract class AcModelDtoBase : IAcModelDtoBase
|
||||||
|
|
||||||
public abstract class AcModelDtoBase<TMainEntity> : AcModelDtoBase, IAcModelDtoBase<TMainEntity> where TMainEntity : IEntityGuid
|
public abstract class AcModelDtoBase<TMainEntity> : AcModelDtoBase, IAcModelDtoBase<TMainEntity> where TMainEntity : IEntityGuid
|
||||||
{
|
{
|
||||||
protected AcModelDtoBase() : base() { }
|
protected AcModelDtoBase() { }
|
||||||
protected AcModelDtoBase(Guid id) : base(id) { }
|
protected AcModelDtoBase(Guid id) : this() => Id = id;
|
||||||
protected AcModelDtoBase(TMainEntity mainEntity) : this(mainEntity.Id) { }
|
protected AcModelDtoBase(TMainEntity mainEntity) : this(mainEntity.Id) { }
|
||||||
|
|
||||||
public virtual TMainEntity CreateMainEntity()
|
public virtual TMainEntity CreateMainEntity()
|
||||||
{
|
{
|
||||||
var mainEntity = Activator.CreateInstance<TMainEntity>();
|
throw new NotImplementedException();
|
||||||
mainEntity.Id = Id;
|
|
||||||
|
|
||||||
return mainEntity;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ using AyCode.Interfaces.Users.Dtos;
|
||||||
|
|
||||||
namespace AyCode.Models.Users;
|
namespace AyCode.Models.Users;
|
||||||
|
|
||||||
public abstract class AcUserModelDtoMinBase<TUserDtoMin, TProfileDto> : AcModelDtoBase, /*AcModelDtoBase<IAcUserDtoMinBase<TProfileDto>>,*/ IAcUserModelDtoMinBase
|
public abstract class AcUserModelDtoMinBase<TUserDtoMin, TProfileDto> : AcModelDtoBase, IAcUserModelDtoMinBase
|
||||||
where TUserDtoMin : class, IAcUserDtoMinBase
|
where TUserDtoMin : class, IAcUserDtoMinBase
|
||||||
//where TProfile : class, IAcProfileDtoBase
|
//where TProfile : class, IAcProfileDtoBase
|
||||||
where TProfileDto : class, IAcProfileDtoBase
|
where TProfileDto : class, IAcProfileDtoBase
|
||||||
|
|
@ -31,15 +31,4 @@ public abstract class AcUserModelDtoMinBase<TUserDtoMin, TProfileDto> : AcModelD
|
||||||
ProfileDto.LastName = user.Profile.LastName;
|
ProfileDto.LastName = user.Profile.LastName;
|
||||||
//Profile.NickName = user.Profile.NickName;
|
//Profile.NickName = user.Profile.NickName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//public virtual TUserDtoMin CreateMainEntity()
|
|
||||||
//{
|
|
||||||
// var user = base.CreateMainEntity();
|
|
||||||
|
|
||||||
// user.AffiliateId = UserDto.AffiliateId;
|
|
||||||
// user.ProfileId = ProfileDto.Id;
|
|
||||||
|
|
||||||
// user.Profile = Activator.CreateInstance<>()
|
|
||||||
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue