Skip to content

trackable entities-js #238

@BatelAyala

Description

@BatelAyala

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions