Cloud.DataAccess.GenericRepository.UOM 1.0.1

dotnet add package Cloud.DataAccess.GenericRepository.UOM --version 1.0.1
NuGet\Install-Package Cloud.DataAccess.GenericRepository.UOM -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cloud.DataAccess.GenericRepository.UOM" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cloud.DataAccess.GenericRepository.UOM --version 1.0.1
#r "nuget: Cloud.DataAccess.GenericRepository.UOM, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Cloud.DataAccess.GenericRepository.UOM as a Cake Addin
#addin nuget:?package=Cloud.DataAccess.GenericRepository.UOM&version=1.0.1

// Install Cloud.DataAccess.GenericRepository.UOM as a Cake Tool
#tool nuget:?package=Cloud.DataAccess.GenericRepository.UOM&version=1.0.1

This Nuget package is used to do the unit of work pattern. How we have to use the code in our application as below

public static void AddAppDependencies(this IServiceCollection services, IConfiguration configuration) {

        ////Add contexts
        services.AddDbContext<xxxxxDbContext>(options => options.UseSqlServer(configuration.GetConnectionString("ConnectionString")));

        ////Security Implementation     
        services.AddSingleton<IConfiguration>(configuration);
        services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
        services.AddSingleton<IContextHelper, ContextHelper>();

                 //Service
        services.AddTransient<IxxxService, xxxServiceImplementation>();


        //Repository
        services.AddTransient<IxxxRepository ,xxxRepositoryImplementation>();

        ///UnitofWork Register
        services.AddScoped<IUnitOfWorkRead, UnitOfWorkRead<xxxxxDbContext>>();
        services.AddScoped<IUnitOfWorkWrite, UnitOfWorkWrite<xxxxxDbContext>>();

    }

/////And above code how to use in our startup.cs

public void ConfigureServices(IServiceCollection services) { //to work with include linq statment (navigaiton properties) services.AddMvc() .AddJsonOptions( options ⇒ options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore );

        //max json string length
        services.AddMvc()
           .AddJsonOptions(
               options => options.SerializerSettings.MaxDepth = int.MaxValue
           );

        //global exception handler
        services.AddMvc(
        config =>
        {
            config.Filters.Add(typeof(ApiExceptionFilter));
        }).SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

        // CORS enabled
        services.AddCors(o => o.AddPolicy("corsname", builder =>
        {
            builder.AllowAnyOrigin()
                   .AllowAnyMethod()
                   .AllowAnyHeader();
        }));

        services.Configure<IISOptions>(options =>
        {
            options.AutomaticAuthentication = false;
        });

        //register dependencies(DI)
        services.AddAppDependencies(Configuration); ///This method is linked with above code.
        var serviceProvider = services.BuildServiceProvider();
    }

////How to use this unit of work in repository class List<Dbset> objDbset=await _unitOfWork.GetRepository<Dbset>().GetAll().ToListAsync();///To get _unitOfWork.GetRepository<Dbset>().GetFirstOrDefault(predicate: x ⇒ x.Id == search.Id && !x.Canceledby.HasValue); //////////// await _unitOfWork.GetRepository<DbSet>().InsertAsync(listDbsetValue, ct);////CancellationToken ct = default(CancellationToken) await _unitOfWork.SaveChangesAsync(); //////////////////////// unitOfWork.GetRepository<DbSet>().Update(listDbSet); await _unitOfWork.SaveChangesAsync();

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 648 8/11/2019
1.0.0 526 8/11/2019