Yes, it's a tricky one to explain.
We had an existing entity on our multi tenant application, eg, Options:
namespace MyProject.Option
{
[Table("Options")]
public class Option : AuditedEntity
{
}
}
But we decided that we needed to allow the tenant user to be able to customise these options so we changed this to:
namespace MyProject.Option
{
[Table("Options")]
public class Option : FullAuditedEntity<int>, IMustHaveTenant
{
}
}
So now we have the problem that the entries were present at the host level, now are not seen at the Tenant level, so we need a magic way to insert those host entries against each client at the tenant level - either as part of the Migration stage, or as part of the login through TenantManager or otherwise?
I'm just having a look over Data Seeding.
Works like a charm, thank you. Though in this case, we need to look at grantedPermissions.
Hi @rvanwoezik - yes we've tried that, but that doesn't work. Although the style IS set with Excel when you look at the Cell Properties, it displays as a number as 0.3125 as noted above.
I figured out how to gain access to the GitHub area. Issue raised.
Hi,
I don't seem to have access to that section of GitHub. Could you advise for me?
Regards, Simon Dean
Ha. I'm an idiot. I forgot to merge in the DbSets to DbContext. Everything's working now.
Thanks Musa,
So in the "ApplicationAppServiceBase.cs" under the Application Project:
`public abstract class ApplicationAppServiceBase : ApplicationService { public TenantManager TenantManager { get; set; }
public UserManager UserManager { get; set; }
public SomeOtherManager SomeOtherManager { get; set; }
protected ApplicationAppServiceBase() { LocalizationSourceName = ApplicationConsts.LocalizationSourceName; }
protected virtual async Task<SomeOtherObject.SomeOtherObject> GetSomeOtherObjectAsync(UserIdentifier userIdentifier) { var object = await SomeOtherManager.GetLinkedObjectForUser(userIdentifier); return object; } }`
TenantManager and UserManager are fine, but "SomeOtherManager" is null so we cannot call "GetSomeOtherObjectAsync" because SomeOtherManager is null.
In the code for the manager, we have:
`using System.Linq; using System.Threading.Tasks; using Abp.Domain.Repositories; using Abp.Domain.Services;
namespace ACUTEC.TimeAndAttendance.OtherObject { public class SomeOtherManager : IDomainService { private readonly IRepository<OtherObject, int> _otherObjectRepository;
public SomeOtherManager(IRepository<OtherObject, int> otherObjectRepository) { _otherObjectRepository = otherObjectRepository; }
public async Task
Which seems pretty standard to me.
As I say, this worked absolutely fine in AspNetZero 6.2.0, but not in 10.3.0
Potential difference I see is that other managers now use extend their own interface as well as the ApplicationDomainServiceBase