Makes perfect sense, thanks.
Hi Aaron,
Just to be clear, I add the following lines to ProjectnameEntityFrameworkCoreModule (I am tracking history for all fully audited entities):
Configuration.EntityHistory.IsEnabled = true; //Enable this to write change logs for the entities below:
Configuration.EntityHistory.Selectors.Add("NuagecareEntities", typeof(OrganizationUnit), typeof(Role), typeof(User), typeof(Tenant));
Configuration.EntityHistory.Selectors.Add(
new NamedTypeSelector(
"Abp.FullAuditedEntities",
type => typeof(IFullAudited).IsAssignableFrom(type)
));
Can you tell what the following lines are for in AuditLogAppService and do I need to change anything?
public List<NameValueDto> GetEntityHistoryObjectTypes()
{
var entityHistoryObjectTypes = new List<NameValueDto>();
if (AbpSession.TenantId == null)
{
entityHistoryObjectTypes.Add(new NameValueDto(L("Nuagecare.MultiTenancy.Tenant"), "Nuagecare.MultiTenancy.Tenant"));
}
entityHistoryObjectTypes.Add(new NameValueDto(L("Nuagecare.MultiTenancy.Role"), "Nuagecare.MultiTenancy.Role"));
entityHistoryObjectTypes.Add(new NameValueDto(L("Abp.Organizations.OrganizationUnit"), "Abp.Organizations.OrganizationUnit"));
return entityHistoryObjectTypes;
}
Thanking you in advance....
After you ran the migrator tool did you start the project with the settings pointed to your Azure database to populate the data?
Doh! Thanks, Aaron. But I'm sure i saw a post whereby auditability had been switched on by default.
I'm not sure why this didn't work, maybe it has something do with nswag and generics. I changed the code to work with a recursive function and a nested list so it's not a show-stopper.
@TimMackey - I'm having similar problems: [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=10952&p=27841]). Something to do with source map locations after a build I think. I am still compromising during debug until I find the correct answer. Please post back if you find something, I will do the same.
@yekalkan - thanks, I read that too. But I'm still not sure how you pulled all those birds from your hankerchief. It must be magic.... :oops:
Hi Aaron, I'm just going to have to go along with you on this one. I've been working with EF for years now (though never with Core before Zero) and always called an update for an update. Even the documentation you referred to explicitly states:
var db = new TestContext();
var book = new Book { BookId = 1 };
db.Update(book); // Book Modified
I don't see how;
ObjectMapper.Map(input, test);
equates to the same thing. The older I get the less I know and the more I realise I have to learn! I will just have to accept that the rabbit came out of the hat even though I know it's impossible....
@ismcagdas - I am using aspnet-core and angular. 5.1.0. This is not your problem. It's something to do with VS Code, currently I have reverted to a mix of stopping the debug process, sometimes I have to stop and restart ng-serve and sometimes I have to debug values in the browser. It's a bit of a pain but I am slowly making progress on how to solve the issue. When I find the answers I will post the results to help anyone else who is using a similar development setup (VS 2017 Community for aspnet-core and VS Code for angular). I'll keep you posted when I find out exactly what is happening.
@ismcagdas - thanks again, I seem to be always in your debt.... Today I started afresh and instead of building my own config I opened the service.config.nswag file from the ProjectName\angular\nswag folder using NSwag Studio ([https://github.com/RSuter/NSwag/wiki/NSwagStudio])). I changed the HTTP service client to HttpClient for compatibility with Ionic 3 and managed to generate a service proxies file into my Ionic project. It's a little bit verbose given the fact that my Ionic project is basically a data entry device for dynamic forms created in Zero but it allows me access to a lot of functionality I do need such as languages, organization units, security and the like. I would seriously suggest you take a look at Ionic as an alternative to Xamarin. Thanks again.