Hi,
You can take a look at MultipleDbContextDemo sample here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/MultipleDbContextDemo">https://github.com/aspnetboilerplate/as ... ontextDemo</a>
What you are looking for is implemented here. Please let us know if you have any problems while implementing it.
I know this seems not a good way at first but this is how EntityFramework works. I dont't know your case very well but as a DDD best practice, it's better to get an entity first (even aggregate root) and then change necessary parts is suggested.
ABP sets TenantId for entity creations, not for entity updates. ABP can set TenantId when updating a record but this is not a good way either.
If there are fields not exists in yor DTO/Input class but exists in Entity, for example an IsActive field which you dont want users to update this field.
Then in your approach, if you dont get entity from database, mapping input (which does not have an IsActive field) to your entity will create an Entity with IsActive=false. And if you update this entity it's IsActive field will be updated tp false which you dont want.
I'm not sure about your system but getting an entity with a primary key should be a performance problem for most of the systems. But as I said I dont know your system :), it might be a problem in your case.
Hi,
Actually there is nothing special about ABP or AspNet Zero about it.
I have tried with a newly created AspNet Zero project according to this document <a class="postlink" href="https://www.asp.net/signalr/overview/performance/scaleout-with-windows-azure-service-bus">https://www.asp.net/signalr/overview/pe ... ervice-bus</a> and connection to signalr seems fine.
Then I tried to add a chat friend and got this error System.InvalidOperationException "The only supported IsolationLevel is 'IsolationLevel.Serializable'."
I solved it by adding "[UnitOfWork(IsolationLevel.Serializable)]" attribute to CreateFriendshipRequestByUserName method of FriendshipAppService class.
But after that, even a chat fiend is added to database, I couldn't get signalr response back. Still working on it :).
By the way, do you have any exception message in client side or server side ?
Hi,
You are right, setting it manually is not a good solution.
Actually, ABP does not set TenantId when updating a record. Suggested usage for updating a record is:
I think your CreateOrUpdateProjectDeliveryInput class does not have TenantId field. So when you run this line
var projectDelivery = input.MapTo<ProjectDeliveries>();
a new instance of ProjectDeliveries entity is created with TenantId=0, and probably your CreateOrUpdateProjectDeliveryInput class has an Id field which is set to a number bigger than 0.
In this case, EntityFramework updates all fields of entity including TenantId. As I pointed out above, if you use the suggested approach I think it will work as expected.
Please let us know of your progress.
Hi,
Can you try to execute datepicker plugin code in modal's shown event like this.
modal.on('shown.bs.modal', function () {
modal.find('.date-picker').datepicker({
orientation: "left",
autoclose: true
});
});
Hi,
I have replied your email with a more detailed explanation of your problem. For others having same problem, ListResultOutput is renamed in ABP v1.0, see <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1402">https://github.com/aspnetboilerplate/as ... ssues/1402</a>.
Hi,
You are invited to private repository, can you try again ?
Hi,
Do you still have this problem ? And which version of ABP do you use right now ?
Hi,
I'm not sure but this might happen when not all javascript files are loaded. Maybe you can check Chrome's developer console for javascript errors for the next time. You can select "Preserve logs" checkbox to catch the error if there are any.
Hi,
No it's not related to performance actually. Almost all entities in most systems has a reference to User entity because of CreatorUserId or a similar field.
If you follow this method (adding a navigation property for Posts to User), your User entity will have lots of navigation properties. I think this is not good practice.
But it's your choice anyway :)