using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Internal; using NejAccountingAPI.Models; namespace AutoMapProperty; public class AutoMapPropertyUtils { public static T Create(IServiceProvider provider) where T : class { var appDb = provider.GetRequiredService(); return appDb.Create(); } public static T Create(IServiceProvider provider, TParent parent, string name) where T : class, new() where TParent : class { var appDb = provider.GetRequiredService(); return appDb.Create(parent, name); } }