From 5f2bce7ed5764186a543c0c85776a3537be914dc Mon Sep 17 00:00:00 2001 From: "jozsef.b@aycode.com" <9Rj@D}fVwBaN> Date: Wed, 29 May 2024 16:11:24 +0200 Subject: [PATCH] fixes --- Mango.Database.Test/UserDalTests.cs | 5 +++++ Mango.Database/DbSets/Users/IUserDbSet.cs | 2 +- Mango.Entities/Companies/Company.cs | 3 ++- Mango.Interfaces/Companies/ICompany.cs | 7 +++++-- Mango.Interfaces/Users/IUser.cs | 6 +++--- Mango.Interfaces/Users/IUserDto.cs | 8 ++++---- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Mango.Database.Test/UserDalTests.cs b/Mango.Database.Test/UserDalTests.cs index 9609142..1355e81 100644 --- a/Mango.Database.Test/UserDalTests.cs +++ b/Mango.Database.Test/UserDalTests.cs @@ -23,6 +23,11 @@ public class UserDalTests : AcUserDalTestBase base.AcBase_GetUserById_ReturnsUser_WhenUserExists(userIdString); + [DataTestMethod] + [DataRow("540271F6-C604-4C16-8160-D5A7CAFEDF00")] + public override void AcBase_GetUserModelDtoDetailById_ReturnsUser_WhenUserExists(string userIdString) + => base.AcBase_GetUserModelDtoDetailById_ReturnsUser_WhenUserExists(userIdString); + [DataTestMethod] [DataRow(["e31044d7-1771-4a32-8dd9-6f9853ed53c6", "0a831191-70a3-4504-9ec4-c5902affaba7", "8eed080c-d2ce-4cc3-bcfe-2268c220bba7", "addUser_test9432@tiam.hu"])] public override async Task AcBase_AddUserTest(string[] userIdProfileIdAddressIdEmailStrings) diff --git a/Mango.Database/DbSets/Users/IUserDbSet.cs b/Mango.Database/DbSets/Users/IUserDbSet.cs index a47daf6..9142d82 100644 --- a/Mango.Database/DbSets/Users/IUserDbSet.cs +++ b/Mango.Database/DbSets/Users/IUserDbSet.cs @@ -6,6 +6,6 @@ using Mango.Entities.Users; namespace Mango.Database.DbSets.Users; -public interface IUserDbSet : IAcUserDbSet +public interface IUserDbSet : IAcUserDbSetBase { } \ No newline at end of file diff --git a/Mango.Entities/Companies/Company.cs b/Mango.Entities/Companies/Company.cs index 3fba163..5b26e20 100644 --- a/Mango.Entities/Companies/Company.cs +++ b/Mango.Entities/Companies/Company.cs @@ -1,5 +1,6 @@ using System.ComponentModel.DataAnnotations.Schema; using AyCode.Entities.ServiceProviders; +using Mango.Entities.Addresses; using Mango.Entities.Profiles; using Mango.Entities.Users; using Mango.Interfaces.Companies; @@ -7,7 +8,7 @@ using Mango.Interfaces.Companies; namespace Mango.Entities.Companies; [Table("ServiceProviders")] -public class Company : AcCompany, ICompany, ICompanyBase +public class Company : AcCompany, ICompany, ICompanyBase { public Company() { diff --git a/Mango.Interfaces/Companies/ICompany.cs b/Mango.Interfaces/Companies/ICompany.cs index f06b1a3..531adf3 100644 --- a/Mango.Interfaces/Companies/ICompany.cs +++ b/Mango.Interfaces/Companies/ICompany.cs @@ -1,14 +1,17 @@ using AyCode.Interfaces.ServiceProviders; using AyCode.Interfaces.Users; using System; +using AyCode.Interfaces.Addresses; +using AyCode.Interfaces.Profiles; using AyCode.Interfaces.Profiles.Dtos; using Mango.Interfaces.Users; using Mango.Interfaces.Profiles; namespace Mango.Interfaces.Companies; -public interface ICompany : IAcCompany +public interface ICompany : IAcCompany where TUser : class, IUserBase where TUserToCompany : class, IUserToCompanyBase - where TProfile : class, IProfileDto + where TProfile : class, IAcProfile + where TAddress : class, IAcAddress {} \ No newline at end of file diff --git a/Mango.Interfaces/Users/IUser.cs b/Mango.Interfaces/Users/IUser.cs index 7280147..1684b4e 100644 --- a/Mango.Interfaces/Users/IUser.cs +++ b/Mango.Interfaces/Users/IUser.cs @@ -5,10 +5,10 @@ using Mango.Interfaces.Profiles; namespace Mango.Interfaces.Users; -public interface IUser : IAcUser, IUserDto, IUserBase - where TProfile : class, IProfile +public interface IUser : IAcUser, IUserDto, IUserBase + where TProfile : class, IProfile where TCompany : class, ICompanyBase where TUserToCompany : class, IUserToCompanyBase - where TProfileAddress : class, IAddress + where TAddress : class, IAddress { } \ No newline at end of file diff --git a/Mango.Interfaces/Users/IUserDto.cs b/Mango.Interfaces/Users/IUserDto.cs index 52c3ba0..7064489 100644 --- a/Mango.Interfaces/Users/IUserDto.cs +++ b/Mango.Interfaces/Users/IUserDto.cs @@ -1,13 +1,13 @@ -using AyCode.Interfaces.Users.Dtos; +using AyCode.Interfaces.Profiles.Dtos; +using AyCode.Interfaces.Users.Dtos; using Mango.Interfaces.Addresses; using Mango.Interfaces.Companies; using Mango.Interfaces.Profiles; namespace Mango.Interfaces.Users; -public interface IUserDto : IAcUserDtoBase - where TProfile : class, IProfile +public interface IUserDto : IAcUserDtoBase + where TProfile : class, IAcProfileDtoBase where TCompany : class, ICompanyBase where TUserToCompany : class, IUserToCompanyBase - where TProfileAddress : class, IAddress { } \ No newline at end of file