You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have started to share datamodel classes between server and client in our project, but to make it work I had to change this method in the ServiceSerializer class because the Version column on the client side is now of type byte[] like on the server side:
public static string GetVersion(JObject instance)
{
foreach (JProperty property in instance.Properties())
{
if (string.Equals(property.Name, SystemProperties.JsonVersionProperty, StringComparison.OrdinalIgnoreCase))
{
return JsonConvert.SerializeObject(instance.Value<byte[]>(property.Name)).Replace("\"", "");
}
}
return null;
}
It would be great if the new version of the library allowed this, so that the same classes could be reused between server and client.
The text was updated successfully, but these errors were encountered:
As an FYI - this should work - I need to add specific integration test suite.
However, even more so now than before, sharing models between client and server will be difficult because of differing requirements - indexing, SQLite vs. AzureSQL requirements, etc. all suggest that interfaces with two different implementations is the way to go.
Ok, I will keep this in mind, sharing data model classes between client and server saves us a lot of time, but at this point we are only sharing a small percentage of our entire model.
I will wait until the new library version is released to see if there are any problems with this approach in our project.
We have started to share datamodel classes between server and client in our project, but to make it work I had to change this method in the ServiceSerializer class because the Version column on the client side is now of type byte[] like on the server side:
It would be great if the new version of the library allowed this, so that the same classes could be reused between server and client.
The text was updated successfully, but these errors were encountered: