Biostatistics.ImportClient 0.144.1

dotnet add package Biostatistics.ImportClient --version 0.144.1                
NuGet\Install-Package Biostatistics.ImportClient -Version 0.144.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="Biostatistics.ImportClient" Version="0.144.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Biostatistics.ImportClient --version 0.144.1                
#r "nuget: Biostatistics.ImportClient, 0.144.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 Biostatistics.ImportClient as a Cake Addin
#addin nuget:?package=Biostatistics.ImportClient&version=0.144.1

// Install Biostatistics.ImportClient as a Cake Tool
#tool nuget:?package=Biostatistics.ImportClient&version=0.144.1                

Biostatistics

EF Core Commands

Drop Database

dotnet ef database drop --project src/Biostatistics.Infrastructure

Compile Models

dotnet ef dbcontext optimize -c BiostatisticsContext -o ../Biostatistics.Infrastructure/Database/CompiledModels -n Biostatistics.Infrastructure.Database.CompileModels --project src/Biostatistics.Infrastructure --nativeaot

Add Migrations

dotnet ef migrations add <migrationName> --project src/Biostatistics.Infrastructure

Remove Migrations

dotnet ef migrations remove --project src/Biostatistics.Infrastructure

How to Add a Data Source

1. Add Data Source

To add a new data source, follow these steps:

  1. Open the "DataSource.json" file located in the "SeedData/Data" directory within the "Biostatistics.Seeder" project.
  2. Replace <guid>, <nameDataSource>, and <DateTimeInUtcFormat> with appropriate values in the JSON structure:
{
  "DataSourceId": "<guid>",
  "Name": "<nameDataSource>",
  "DataToggle": false,
  "RecordCount": 0,
  "LastUpdated": null,
  "OriginTimeZone": "America/Puerto_Rico",
  "CreatedAt": "<DateTimeInUtcFormat>"
}

2. Add Model

In the "Biostatistics.Domain" project, create a new model with its respective properties using the following steps:

  1. Create a new directory to contain the model.
  2. Design the model class with necessary properties. Ensure mandatory properties such as "Id" and "DataToggle" are included:
public sealed class ModelName
{
    public long Id { get; set; } // Mandatory property
    // Insert other properties
    public bool DataToggle { get; set; } // Mandatory property
}

3. Add ConfigurationModel

In the "Biostatistics.Infrastructure" project, within the "Database/Configurations" directory, add a configuration class for the previously created model using these steps:

  1. Create a class named ModelNameConfiguration implementing IEntityTypeConfiguration<ModelName>.
  2. Configure the model properties and indexes in the Configure method:
public class ModelNameConfiguration : IEntityTypeConfiguration<ModelName>
{
    public void Configure(EntityTypeBuilder<ModelName> entity)
    {
        entity.ToTable("ModelName", "SchemaName");

        entity.HasKey(e => e.Id);

        entity.HasIndex(e => e.DataToggle)
            .HasDatabaseName("ModelName_data_toggle_idx");

        // Add other indexes for other properties
    }
}

4. Add Configuration to the Database Context

Navigate to "BiostatisticsContext.cs" within the "Biostatistics.Infrastructure" project and include the following code snippet inside the class:

public sealed class BiostatisticsContext : DbContext
{
    public BiostatisticsContext(DbContextOptions<BiostatisticsContext> options)
        : base(options) {}

    public DbSet<ModelName> ModelName => Set<ModelName>(); // Add this command
    //... other code
}

In the OnModelCreating method within "BiostatisticsContext.cs", incorporate the configuration for the new model:

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    // other configurations
    modelBuilder.ApplyConfiguration(new ModelNameConfiguration()); // Add this command
}

5. Add Migration

To generate a migration for the newly created model, execute the following command in the terminal:

dotnet ef migrations add <migrationName> --project src/Biostatistics.Infrastructure

Replace <migrationName> with an appropriate name for your migration.

6. Run Compiled Models

Run the compiled models

These steps will assimilate the new model configuration into the database context, create a migration, and execute the compiled models. Replace <ModelName> with your model's actual name.

7. Add ImportClient Dto

Within the "Biostatistics.ImportClient" project, generate a new record representing the previously added model, for instance:

public readonly record struct ModelNameImportDto
( 
  // Model properties
);

8. Add Function to Upload Data Source

In the "BiostatisticsImportClient.cs" file, implement the subsequent method:

public async Task<ImportResultDto> UploadDataSource(IAsyncEnumerable<ModelNameImportDto> dataList)
{
    return await UploadDataToSource(nameof(ModelNameImportDto), dataList);
}

Similarly, add the function declaration in the "BiostatisticsImportClient.cs":

Task<ImportResultDto> UploadDataSource(IAsyncEnumerable<ModelNameImportDto> dataList);

9. Update NuGet Package

Bump new project version and create a Release. This will kick off the CI/CD to publish new versions of the project Nuget package.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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
0.144.1 83 11/24/2024
0.144.0 436 10/31/2024
0.143.0 85 10/30/2024
0.142.0 81 10/30/2024
0.141.0 79 10/30/2024
0.140.0 72 10/29/2024
0.139.0 69 10/29/2024
0.138.1 89 10/28/2024
0.138.0 76 10/28/2024
0.137.1 139 10/24/2024
0.137.0 72 10/24/2024
0.136.0 107 10/23/2024
0.135.1 75 10/23/2024
0.135.0 74 10/23/2024
0.134.3 684 9/21/2024
0.134.2 141 9/18/2024
0.134.1 94 9/17/2024
0.134.0 193 9/16/2024
0.133.0 117 9/15/2024
0.132.0 113 9/14/2024
0.131.0 96 9/14/2024
0.130.0 84 9/14/2024
0.129.1 111 9/14/2024
0.128.0 165 9/8/2024
0.127.1 132 9/7/2024
0.127.0 120 9/7/2024
0.126.0 138 9/5/2024
0.125.0 100 9/5/2024
0.124.0 96 8/29/2024
0.123.0 101 8/29/2024
0.122.0 81 8/28/2024
0.121.0 115 8/28/2024
0.120.1 95 8/28/2024
0.120.0 92 8/28/2024
0.119.1 157 8/27/2024
0.119.0 89 8/27/2024
0.118.0 128 8/26/2024
0.117.0 111 8/25/2024
0.116.0 120 8/25/2024
0.115.0 96 8/24/2024
0.114.0 106 8/24/2024
0.113.0 117 8/24/2024
0.112.0 118 8/21/2024
0.111.0 160 8/20/2024
0.110.1 144 8/18/2024
0.110.0 117 8/18/2024
0.109.0 141 8/17/2024
0.108.0 110 8/16/2024
0.107.0 112 8/16/2024
0.106.0 115 8/15/2024
0.105.0 114 8/15/2024
0.104.0 122 8/15/2024
0.103.1 105 8/15/2024
0.103.0 104 8/15/2024
0.102.3 95 8/8/2024
0.102.2 141 8/7/2024
0.102.1 92 8/6/2024
0.102.0 72 8/2/2024
0.101.0 76 8/2/2024
0.100.0 64 8/2/2024
0.99.0 74 8/2/2024
0.98.1 77 7/31/2024
0.98.0 77 7/31/2024
0.97.0 74 7/31/2024
0.96.0 75 7/31/2024
0.95.0 64 7/30/2024
0.94.1 58 7/30/2024
0.94.0 60 7/30/2024
0.93.0 63 7/30/2024
0.92.0 62 7/30/2024
0.91.1 63 7/27/2024
0.91.0 66 7/27/2024
0.90.1 53 7/27/2024
0.90.0 71 7/27/2024
0.89.2 108 7/26/2024
0.89.1 136 7/25/2024
0.89.0 81 7/24/2024
0.88.0 91 7/24/2024
0.87.0 151 7/22/2024
0.86.0 105 7/20/2024
0.85.0 97 7/15/2024
0.84.1 544 6/10/2024
0.84.0 86 6/10/2024
0.83.1 160 6/4/2024
0.83.0 102 5/29/2024
0.82.0 229 5/26/2024
0.81.0 273 4/18/2024
0.80.0 133 4/16/2024
0.79.0 163 4/12/2024
0.78.4 123 4/11/2024
0.78.3 127 4/11/2024
0.78.2 112 4/11/2024
0.78.1 124 4/10/2024
0.78.0 112 4/10/2024
0.77.0 110 4/8/2024
0.76.0 137 4/8/2024
0.75.0 109 4/6/2024
0.74.0 124 4/5/2024
0.73.0 139 4/3/2024
0.72.1 102 4/3/2024
0.72.0 98 4/3/2024
0.71.0 118 4/3/2024
0.70.0 99 4/3/2024
0.69.0 113 4/2/2024
0.68.1 110 4/1/2024
0.68.0 124 4/1/2024
0.67.0 125 4/1/2024
0.66.0 120 3/30/2024
0.65.0 110 3/29/2024
0.64.0 103 3/29/2024
0.63.0 121 3/29/2024
0.62.0 94 3/29/2024
0.61.0 110 3/28/2024
0.60.0 105 3/27/2024
0.59.0 130 3/27/2024
0.58.0 148 3/25/2024
0.57.1 124 3/25/2024
0.57.0 105 3/25/2024
0.56.0 133 3/25/2024
0.55.0 113 3/24/2024
0.54.1 148 3/21/2024
0.54.0 114 3/20/2024
0.53.0 122 3/19/2024
0.52.0 136 3/18/2024
0.50.0 247 3/7/2024
0.49.1 129 3/7/2024
0.49.0 150 3/7/2024
0.48.0 124 3/3/2024
0.47.2 122 3/3/2024
0.47.1 115 3/3/2024
0.47.0 114 3/3/2024
0.46.1 182 2/24/2024
0.46.0 109 2/24/2024
0.45.0 415 1/12/2024
0.44.3 406 12/20/2023
0.44.2 123 12/20/2023
0.44.1 115 12/20/2023
0.44.0 110 12/20/2023
0.43.0 441 12/1/2023
0.42.1 145 11/29/2023
0.42.0 125 11/29/2023
0.41.0 134 11/29/2023
0.40.0 475 10/13/2023
0.39.0 146 10/13/2023
0.38.0 400 9/22/2023
0.37.0 274 9/14/2023
0.36.2 145 9/14/2023
0.36.1 126 9/14/2023
0.36.0 158 9/14/2023
0.35.0 284 9/1/2023
0.34.0 216 8/25/2023
0.33.0 236 8/11/2023
0.32.0 171 8/9/2023
0.31.0 197 7/12/2023
0.30.0 153 7/12/2023
0.29.0 163 7/12/2023
0.28.0 395 5/24/2023
0.27.0 168 5/22/2023
0.26.0 155 5/20/2023
0.25.0 247 5/1/2023
0.24.0 139 5/1/2023
0.23.0 219 4/27/2023
0.22.0 162 4/27/2023
0.21.0 172 4/26/2023
0.20.0 158 4/25/2023
0.19.0 159 4/25/2023
0.18.0 171 4/21/2023
0.17.0 163 4/21/2023
0.16.0 337 3/27/2023
0.15.0 202 3/25/2023
0.14.0 210 3/25/2023
0.12.0 586 3/2/2023
0.11.0 714 1/31/2023
0.10.0 330 1/26/2023
0.9.0 528 1/5/2023
0.8.0 300 1/4/2023
0.7.0 300 1/4/2023
0.6.0 296 1/4/2023
0.5.0 310 1/4/2023
0.4.0 294 1/4/2023
0.3.0 283 1/4/2023
0.2.0 306 1/4/2023
0.1.0 323 1/3/2023