Biostatistics.ImportClient
0.92.0
See the version list below for details.
dotnet add package Biostatistics.ImportClient --version 0.92.0
NuGet\Install-Package Biostatistics.ImportClient -Version 0.92.0
<PackageReference Include="Biostatistics.ImportClient" Version="0.92.0" />
paket add Biostatistics.ImportClient --version 0.92.0
#r "nuget: Biostatistics.ImportClient, 0.92.0"
// Install Biostatistics.ImportClient as a Cake Addin #addin nuget:?package=Biostatistics.ImportClient&version=0.92.0 // Install Biostatistics.ImportClient as a Cake Tool #tool nuget:?package=Biostatistics.ImportClient&version=0.92.0
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
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:
- Open the "DataSource.json" file located in the "SeedData/Data" directory within the "Biostatistics.Seeder" project.
- 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:
- Create a new directory to contain the model.
- 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:
- Create a class named
ModelNameConfiguration
implementingIEntityTypeConfiguration<ModelName>
. - 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 | Versions 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. |
-
net8.0
- Azure.Storage.Blobs (>= 12.21.1)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- protobuf-net (>= 3.2.30)
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.0 | 261 | 10/31/2024 |
0.143.0 | 79 | 10/30/2024 |
0.142.0 | 75 | 10/30/2024 |
0.141.0 | 73 | 10/30/2024 |
0.140.0 | 66 | 10/29/2024 |
0.139.0 | 62 | 10/29/2024 |
0.138.1 | 82 | 10/28/2024 |
0.138.0 | 69 | 10/28/2024 |
0.137.1 | 134 | 10/24/2024 |
0.137.0 | 67 | 10/24/2024 |
0.136.0 | 103 | 10/23/2024 |
0.135.1 | 71 | 10/23/2024 |
0.135.0 | 70 | 10/23/2024 |
0.134.3 | 682 | 9/21/2024 |
0.134.2 | 139 | 9/18/2024 |
0.134.1 | 92 | 9/17/2024 |
0.134.0 | 191 | 9/16/2024 |
0.133.0 | 115 | 9/15/2024 |
0.132.0 | 111 | 9/14/2024 |
0.131.0 | 94 | 9/14/2024 |
0.130.0 | 82 | 9/14/2024 |
0.129.1 | 109 | 9/14/2024 |
0.128.0 | 162 | 9/8/2024 |
0.127.1 | 129 | 9/7/2024 |
0.127.0 | 117 | 9/7/2024 |
0.126.0 | 135 | 9/5/2024 |
0.125.0 | 97 | 9/5/2024 |
0.124.0 | 94 | 8/29/2024 |
0.123.0 | 99 | 8/29/2024 |
0.122.0 | 79 | 8/28/2024 |
0.121.0 | 113 | 8/28/2024 |
0.120.1 | 93 | 8/28/2024 |
0.120.0 | 90 | 8/28/2024 |
0.119.1 | 155 | 8/27/2024 |
0.119.0 | 87 | 8/27/2024 |
0.118.0 | 126 | 8/26/2024 |
0.117.0 | 109 | 8/25/2024 |
0.116.0 | 118 | 8/25/2024 |
0.115.0 | 94 | 8/24/2024 |
0.114.0 | 104 | 8/24/2024 |
0.113.0 | 115 | 8/24/2024 |
0.112.0 | 116 | 8/21/2024 |
0.111.0 | 158 | 8/20/2024 |
0.110.1 | 142 | 8/18/2024 |
0.110.0 | 115 | 8/18/2024 |
0.109.0 | 139 | 8/17/2024 |
0.108.0 | 108 | 8/16/2024 |
0.107.0 | 110 | 8/16/2024 |
0.106.0 | 113 | 8/15/2024 |
0.105.0 | 112 | 8/15/2024 |
0.104.0 | 120 | 8/15/2024 |
0.103.1 | 103 | 8/15/2024 |
0.103.0 | 102 | 8/15/2024 |
0.102.3 | 93 | 8/8/2024 |
0.102.2 | 139 | 8/7/2024 |
0.102.1 | 90 | 8/6/2024 |
0.102.0 | 70 | 8/2/2024 |
0.101.0 | 74 | 8/2/2024 |
0.100.0 | 62 | 8/2/2024 |
0.99.0 | 72 | 8/2/2024 |
0.98.1 | 75 | 7/31/2024 |
0.98.0 | 75 | 7/31/2024 |
0.97.0 | 72 | 7/31/2024 |
0.96.0 | 73 | 7/31/2024 |
0.95.0 | 62 | 7/30/2024 |
0.94.1 | 56 | 7/30/2024 |
0.94.0 | 58 | 7/30/2024 |
0.93.0 | 61 | 7/30/2024 |
0.92.0 | 60 | 7/30/2024 |
0.91.1 | 61 | 7/27/2024 |
0.91.0 | 64 | 7/27/2024 |
0.90.1 | 51 | 7/27/2024 |
0.90.0 | 69 | 7/27/2024 |
0.89.2 | 106 | 7/26/2024 |
0.89.1 | 134 | 7/25/2024 |
0.89.0 | 79 | 7/24/2024 |
0.88.0 | 89 | 7/24/2024 |
0.87.0 | 149 | 7/22/2024 |
0.86.0 | 103 | 7/20/2024 |
0.85.0 | 95 | 7/15/2024 |
0.84.1 | 542 | 6/10/2024 |
0.84.0 | 84 | 6/10/2024 |
0.83.1 | 158 | 6/4/2024 |
0.83.0 | 100 | 5/29/2024 |
0.82.0 | 227 | 5/26/2024 |
0.81.0 | 271 | 4/18/2024 |
0.80.0 | 131 | 4/16/2024 |
0.79.0 | 161 | 4/12/2024 |
0.78.4 | 121 | 4/11/2024 |
0.78.3 | 125 | 4/11/2024 |
0.78.2 | 110 | 4/11/2024 |
0.78.1 | 122 | 4/10/2024 |
0.78.0 | 110 | 4/10/2024 |
0.77.0 | 108 | 4/8/2024 |
0.76.0 | 135 | 4/8/2024 |
0.75.0 | 107 | 4/6/2024 |
0.74.0 | 122 | 4/5/2024 |
0.73.0 | 137 | 4/3/2024 |
0.72.1 | 100 | 4/3/2024 |
0.72.0 | 96 | 4/3/2024 |
0.71.0 | 116 | 4/3/2024 |
0.70.0 | 97 | 4/3/2024 |
0.69.0 | 111 | 4/2/2024 |
0.68.1 | 108 | 4/1/2024 |
0.68.0 | 122 | 4/1/2024 |
0.67.0 | 123 | 4/1/2024 |
0.66.0 | 118 | 3/30/2024 |
0.65.0 | 108 | 3/29/2024 |
0.64.0 | 101 | 3/29/2024 |
0.63.0 | 119 | 3/29/2024 |
0.62.0 | 92 | 3/29/2024 |
0.61.0 | 108 | 3/28/2024 |
0.60.0 | 103 | 3/27/2024 |
0.59.0 | 128 | 3/27/2024 |
0.58.0 | 146 | 3/25/2024 |
0.57.1 | 122 | 3/25/2024 |
0.57.0 | 103 | 3/25/2024 |
0.56.0 | 131 | 3/25/2024 |
0.55.0 | 111 | 3/24/2024 |
0.54.1 | 146 | 3/21/2024 |
0.54.0 | 112 | 3/20/2024 |
0.53.0 | 120 | 3/19/2024 |
0.52.0 | 134 | 3/18/2024 |
0.50.0 | 245 | 3/7/2024 |
0.49.1 | 127 | 3/7/2024 |
0.49.0 | 148 | 3/7/2024 |
0.48.0 | 122 | 3/3/2024 |
0.47.2 | 120 | 3/3/2024 |
0.47.1 | 113 | 3/3/2024 |
0.47.0 | 112 | 3/3/2024 |
0.46.1 | 180 | 2/24/2024 |
0.46.0 | 107 | 2/24/2024 |
0.45.0 | 413 | 1/12/2024 |
0.44.3 | 404 | 12/20/2023 |
0.44.2 | 121 | 12/20/2023 |
0.44.1 | 113 | 12/20/2023 |
0.44.0 | 108 | 12/20/2023 |
0.43.0 | 439 | 12/1/2023 |
0.42.1 | 143 | 11/29/2023 |
0.42.0 | 123 | 11/29/2023 |
0.41.0 | 132 | 11/29/2023 |
0.40.0 | 471 | 10/13/2023 |
0.39.0 | 144 | 10/13/2023 |
0.38.0 | 398 | 9/22/2023 |
0.37.0 | 272 | 9/14/2023 |
0.36.2 | 143 | 9/14/2023 |
0.36.1 | 122 | 9/14/2023 |
0.36.0 | 156 | 9/14/2023 |
0.35.0 | 282 | 9/1/2023 |
0.34.0 | 214 | 8/25/2023 |
0.33.0 | 234 | 8/11/2023 |
0.32.0 | 169 | 8/9/2023 |
0.31.0 | 195 | 7/12/2023 |
0.30.0 | 151 | 7/12/2023 |
0.29.0 | 161 | 7/12/2023 |
0.28.0 | 393 | 5/24/2023 |
0.27.0 | 166 | 5/22/2023 |
0.26.0 | 153 | 5/20/2023 |
0.25.0 | 245 | 5/1/2023 |
0.24.0 | 137 | 5/1/2023 |
0.23.0 | 217 | 4/27/2023 |
0.22.0 | 160 | 4/27/2023 |
0.21.0 | 170 | 4/26/2023 |
0.20.0 | 154 | 4/25/2023 |
0.19.0 | 157 | 4/25/2023 |
0.18.0 | 169 | 4/21/2023 |
0.17.0 | 161 | 4/21/2023 |
0.16.0 | 335 | 3/27/2023 |
0.15.0 | 200 | 3/25/2023 |
0.14.0 | 208 | 3/25/2023 |
0.12.0 | 584 | 3/2/2023 |
0.11.0 | 712 | 1/31/2023 |
0.10.0 | 328 | 1/26/2023 |
0.9.0 | 526 | 1/5/2023 |
0.8.0 | 298 | 1/4/2023 |
0.7.0 | 298 | 1/4/2023 |
0.6.0 | 294 | 1/4/2023 |
0.5.0 | 308 | 1/4/2023 |
0.4.0 | 292 | 1/4/2023 |
0.3.0 | 281 | 1/4/2023 |
0.2.0 | 302 | 1/4/2023 |
0.1.0 | 321 | 1/3/2023 |