Skip to content

Commit

Permalink
Merge branch 'release' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
csharpfritz authored Feb 27, 2022
2 parents f9b0587 + a07a51c commit d6ba7cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Fritz.InstantAPIs/MapApiExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ internal class MapApiExtensions

// TODO: Authentication / Authorization
private static Dictionary<Type, PropertyInfo> _IdLookup = new();
private static ILogger Logger;

private static ILogger Logger;

internal static void Initialize<D,C>(ILogger logger)
where D: DbContext
where C: class
{

Logger = logger;
var theType = typeof(C);

var theType = typeof(C);
var idProp = theType.GetProperty("id", BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance) ?? theType.GetProperties().FirstOrDefault(p => p.CustomAttributes.Any(a => a.AttributeType == typeof(KeyAttribute)));

if (idProp != null)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- Introduced a fluent configuration API for defining which tables to include and exclude from the Entity Framework Context.
- Added the ability to create APIs from JSON files on disk
- Added ability to specify OpenAPI configuration
- Added Logging for reflection API generation
- Added Logging for reflection API generation

0 comments on commit d6ba7cf

Please sign in to comment.