Thanks @Cotur and @liangshiwei. with your suggestions I'm able to save subEvents.
changes worked
1.var alert = await _alertRepository.InsertAsync(newAlert, true); // AutoSave parameter is true
2. you use automapper map object, but you did not initialize the collection in the parameterless constructor.null reference exception will be thrown when adding
Thanks for your help.
Thanks @alper. I found the json files in my local machine. I like the idea of keeping them along with soure code. is there a way to change the default path for these json files?
Hi,
How can I share the entities I have created using ABP Suite with other developers.
Thanks team. Let me try both of your suggestions today. @liangshiwei I also made the repository private.
thank you. I have uploaded the project to GitHub. Can you fork it and see to create an alert using Swagger.
https://github.com/yrk1436/AtlasAir.VGCC
public virtual async Task<AlertDto> CreateAsync(AlertCreateDto input) // Service method
Was able to resolve, Alper. Looks like while first time setting up project .dbMigrator project has to be run. Shouldn't be using Package Manager Console. as dataseed didn't happen, I saw above error while launching IdentityServer module. Can be closed now. Thanks.
Is the Foreign Key voilation error totally because of AlertSubEvent table being extended from IFullAuditObject? we wanted to have soft delete on AlertSubEvent to track when a subEvent removed. Coming to remove logic I'll add the condition (when alert.Id > 0).
My Remove and Addition functionality only adds/removes new subEvents. I'm not cleaning all previous assigned subevents and readding. Say there were 3 subEvents before and a new one is added, I don't need to delete all 3 and add 4 again right. I should just add the new one.
Hi liangshiwei,
Thanks for the response. I didn't want to save bits and pieces. Alert & Alert Sub events should get inserted at a time. Could you see why AlertSubEvents are inserted first before having an entry in Alert table?