csharpfritz / InstantAPIs

A library that generates Minimal API endpoints for an Entity Framework context.
MIT License
448 stars 57 forks source link

Allowed user to override conventions for primary key #72

Open Wayne-Mather opened 1 year ago

Wayne-Mather commented 1 year ago

Previously the code was check for property called id and assume thats the primary key, or find the data annotation [Key].

If the user does not have any of those the application failed. This now allows a convention to be created out-of-the-box and the user to override that convention if necessary.

It also changes the order so if there is a [Key] annotation, that is used by default.

Wayne-Mather commented 1 year ago

Well the squash didn't go so well in clearing up the commit history. Not a git guru by any means so I don't use rebase as I often get it wrong

verbedr commented 1 year ago

Hi @Wayne-Mather not sure what you think went wrong. But usually when you use rebase -i and changed the commit history. You need to push --force those changes otherwise it will try to sync the history and probably create some duplicates. If this is stating the obvious, just ignore this.

ps don't be afraid to lose things in git all commits are still there and can be found back with git reflog.