Base solution for your next web application
Open Closed

CrudAppService and AsyncCrudAppService Classes #2300


User avatar
0
vnetonline created

Dear Support

I am wanting to use the CrudAppService and/or AsyncCrudAppService and it works great when mapped to one Table/Entity which has no relationships with other tables/entities.

However, when I have a table which has a relationship with another table/entity i.e. "ICollection<Phone> Phones" part of the Person Class I am unable to use the update method to update the phones collection in the Person Object.

Can you please let me know if this AppService can update multiple tables/entities which have a relationship??

Thanks and KInd Regards vnetonline


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This is not possible by default because of EF restrictions. You can use GraphDiff package, see <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1073">https://github.com/aspnetboilerplate/as ... ssues/1073</a>.

    Then you need to create your own version of CrudAppService and use GraphDiff in it.