MAUI EntityTableData change name of required fields

Lance Kujala 1 Reputation point
2022-11-24T01:11:42.663+00:00

In MAUI the EntityTableData defines key fields that are used to manage the Datasync process (Id, UpdatedAt, Version, Deleted).

in non-maui applications I have these same fields defined, but with different names (example UserId, EditUTC, Timestamp, IsDeleted).
I would rather not go through a process to refactor field names in existing databases, in order to migrate maui datasync.

is there a way to customize or map the default fields defined by EntityTableData to something else (same data type, just a different name)?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,868 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Lance Kujala 1 Reputation point
    2022-11-24T02:37:02.437+00:00

    yes, you are correct... this is in datasync library.
    maui reference is from the azure-mobile-apps example code have been working with.

    reading the datasync code, it looks like the field references (eg id) are hardcoded into the library.
    still working through the differences between entity and dto in the code in the "mappedtablerepository"... that might be what I want but still working through it

    0 comments No comments

  2. Lance Kujala 1 Reputation point
    2022-11-24T02:41:42.263+00:00

    FYI found this discussion... basically what i was looking at
    https://github.com/Azure/azure-mobile-apps/issues/371

    0 comments No comments