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 300 11/24/2024
0.144.0 451 10/31/2024
0.143.0 95 10/30/2024
0.142.0 87 10/30/2024
0.141.0 85 10/30/2024
0.140.0 80 10/29/2024
0.139.0 77 10/29/2024
0.138.1 95 10/28/2024
0.138.0 82 10/28/2024
0.137.1 145 10/24/2024
0.137.0 78 10/24/2024
0.136.0 115 10/23/2024
0.135.1 83 10/23/2024
0.135.0 79 10/23/2024
0.134.3 689 9/21/2024
0.134.2 148 9/18/2024
0.134.1 102 9/17/2024
0.134.0 197 9/16/2024
0.133.0 122 9/15/2024
0.132.0 118 9/14/2024
0.131.0 102 9/14/2024
0.130.0 89 9/14/2024
0.129.1 120 9/14/2024
0.128.0 174 9/8/2024
0.127.1 139 9/7/2024
0.127.0 125 9/7/2024
0.126.0 143 9/5/2024
0.125.0 105 9/5/2024
0.124.0 103 8/29/2024
0.123.0 106 8/29/2024
0.122.0 88 8/28/2024
0.121.0 120 8/28/2024
0.120.1 100 8/28/2024
0.120.0 97 8/28/2024
0.119.1 164 8/27/2024
0.119.0 94 8/27/2024
0.118.0 131 8/26/2024
0.117.0 116 8/25/2024
0.116.0 125 8/25/2024
0.115.0 101 8/24/2024
0.114.0 113 8/24/2024
0.113.0 122 8/24/2024
0.112.0 123 8/21/2024
0.111.0 168 8/20/2024
0.110.1 149 8/18/2024
0.110.0 120 8/18/2024
0.109.0 146 8/17/2024
0.108.0 115 8/16/2024
0.107.0 117 8/16/2024
0.106.0 120 8/15/2024
0.105.0 121 8/15/2024
0.104.0 127 8/15/2024
0.103.1 112 8/15/2024
0.103.0 109 8/15/2024
0.102.3 100 8/8/2024
0.102.2 150 8/7/2024
0.102.1 98 8/6/2024
0.102.0 78 8/2/2024
0.101.0 84 8/2/2024
0.100.0 70 8/2/2024
0.99.0 81 8/2/2024
0.98.1 86 7/31/2024
0.98.0 82 7/31/2024
0.97.0 79 7/31/2024
0.96.0 80 7/31/2024
0.95.0 69 7/30/2024
0.94.1 61 7/30/2024
0.94.0 65 7/30/2024
0.93.0 68 7/30/2024
0.92.0 67 7/30/2024
0.91.1 75 7/27/2024
0.91.0 71 7/27/2024
0.90.1 62 7/27/2024
0.90.0 80 7/27/2024
0.89.2 113 7/26/2024
0.89.1 139 7/25/2024
0.89.0 86 7/24/2024
0.88.0 96 7/24/2024
0.87.0 156 7/22/2024
0.86.0 109 7/20/2024
0.85.0 102 7/15/2024
0.84.1 551 6/10/2024
0.84.0 93 6/10/2024
0.83.1 165 6/4/2024
0.83.0 107 5/29/2024
0.82.0 234 5/26/2024
0.81.0 276 4/18/2024
0.80.0 138 4/16/2024
0.79.0 166 4/12/2024
0.78.4 128 4/11/2024
0.78.3 132 4/11/2024
0.78.2 115 4/11/2024
0.78.1 131 4/10/2024
0.78.0 115 4/10/2024
0.77.0 115 4/8/2024
0.76.0 142 4/8/2024
0.75.0 114 4/6/2024
0.74.0 129 4/5/2024
0.73.0 142 4/3/2024
0.72.1 105 4/3/2024
0.72.0 103 4/3/2024
0.71.0 121 4/3/2024
0.70.0 102 4/3/2024
0.69.0 116 4/2/2024
0.68.1 113 4/1/2024
0.68.0 127 4/1/2024
0.67.0 128 4/1/2024
0.66.0 123 3/30/2024
0.65.0 113 3/29/2024
0.64.0 106 3/29/2024
0.63.0 124 3/29/2024
0.62.0 99 3/29/2024
0.61.0 113 3/28/2024
0.60.0 110 3/27/2024
0.59.0 133 3/27/2024
0.58.0 151 3/25/2024
0.57.1 127 3/25/2024
0.57.0 108 3/25/2024
0.56.0 138 3/25/2024
0.55.0 116 3/24/2024
0.54.1 151 3/21/2024
0.54.0 117 3/20/2024
0.53.0 125 3/19/2024
0.52.0 139 3/18/2024
0.50.0 250 3/7/2024
0.49.1 132 3/7/2024
0.49.0 153 3/7/2024
0.48.0 126 3/3/2024
0.47.2 125 3/3/2024
0.47.1 120 3/3/2024
0.47.0 119 3/3/2024
0.46.1 185 2/24/2024
0.46.0 112 2/24/2024
0.45.0 418 1/12/2024
0.44.3 409 12/20/2023
0.44.2 126 12/20/2023
0.44.1 118 12/20/2023
0.44.0 113 12/20/2023
0.43.0 444 12/1/2023
0.42.1 148 11/29/2023
0.42.0 128 11/29/2023
0.41.0 137 11/29/2023
0.40.0 480 10/13/2023
0.39.0 149 10/13/2023
0.38.0 403 9/22/2023
0.37.0 278 9/14/2023
0.36.2 150 9/14/2023
0.36.1 129 9/14/2023
0.36.0 161 9/14/2023
0.35.0 287 9/1/2023
0.34.0 219 8/25/2023
0.33.0 239 8/11/2023
0.32.0 174 8/9/2023
0.31.0 200 7/12/2023
0.30.0 156 7/12/2023
0.29.0 166 7/12/2023
0.28.0 398 5/24/2023
0.27.0 171 5/22/2023
0.26.0 158 5/20/2023
0.25.0 250 5/1/2023
0.24.0 142 5/1/2023
0.23.0 222 4/27/2023
0.22.0 165 4/27/2023
0.21.0 175 4/26/2023
0.20.0 161 4/25/2023
0.19.0 162 4/25/2023
0.18.0 174 4/21/2023
0.17.0 166 4/21/2023
0.16.0 340 3/27/2023
0.15.0 205 3/25/2023
0.14.0 213 3/25/2023
0.12.0 589 3/2/2023
0.11.0 717 1/31/2023
0.10.0 333 1/26/2023
0.9.0 531 1/5/2023
0.8.0 303 1/4/2023
0.7.0 303 1/4/2023
0.6.0 299 1/4/2023
0.5.0 313 1/4/2023
0.4.0 297 1/4/2023
0.3.0 286 1/4/2023
0.2.0 309 1/4/2023
0.1.0 326 1/3/2023