fixes
This commit is contained in:
parent
252b1a0f90
commit
e32e6d2759
|
|
@ -49,7 +49,14 @@ public static class AcCompanyDbSetExtensions
|
|||
{
|
||||
if (!ctx.UserToCompanies.Any(x => x.UserId == company.OwnerId && x.ServiceProviderId == company.Id))
|
||||
{
|
||||
company.AddUser(ownerId.Value, 1);
|
||||
var userToCompany = (Activator.CreateInstance(typeof(TUserToCompany)) as TUserToCompany)!;
|
||||
userToCompany.Id = Guid.NewGuid();
|
||||
userToCompany.ServiceProviderId = company.Id;
|
||||
userToCompany.UserId = ownerId.Value;
|
||||
userToCompany.Permissions = 1;
|
||||
|
||||
ctx.UserToCompanies.Add(userToCompany);
|
||||
//company.AddUser(ownerId.Value, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue