Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trackable entities-js #238

Open
BatelAyala opened this issue Jun 9, 2021 · 1 comment
Open

trackable entities-js #238

BatelAyala opened this issue Jun 9, 2021 · 1 comment

Comments

@BatelAyala
Copy link

Hey,
I am using your nugget package for “TrackableEntities.EF.6″ in my web API for the server side (in .net framework)
my client side is angular (8),I install the npm:”npm i –save trackable-entities”
I looked in your sample and I saw that TE have POC of webapi+consoleapplicaton communication but angular only has POC when the object created on the client side and there is no post to server side,
I tries to make POC with client-server communication between angular and web api and here is some problems I met:

  1. The TE on angular work with proxy that the ctor create, in case that I get my object from http request the result is a json and the conversion to the model that extend the TE is not working (I found a workaround that after the get send the result to the ctor and then it worked-but it is not sound ok to do this regularly)
  2. After I have changes on my object I want to send it to server side as body of post request but I get console log of circular reference (=it failed on the serialization) (I found a work around that my model have toJson function but still it doesn’t sound like the best practice)
  3. I want that every model that I get from my webapi to have the tracking=true, but as I see in my code I need to set it after I get the object from the webapi, my object have many inner models so I have to set the tracking=true by running though all my object (this scenario doesn’t sound as best way)
    I will be glad if u can make your opinion on the problems above if I can avoid these problem without using my workarounds
    thanks a lot
@omatrot
Copy link

omatrot commented Dec 7, 2021

Hi,
I think you can find answers to some or your question on one of my blog post using TypeScript client side.
Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants