Ibang.Platform.Common.Infrastructure 1.0.27.72

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ibang.Platform.Common.Infrastructure --version 1.0.27.72
NuGet\Install-Package Ibang.Platform.Common.Infrastructure -Version 1.0.27.72
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="Ibang.Platform.Common.Infrastructure" Version="1.0.27.72" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ibang.Platform.Common.Infrastructure --version 1.0.27.72
#r "nuget: Ibang.Platform.Common.Infrastructure, 1.0.27.72"
#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 Ibang.Platform.Common.Infrastructure as a Cake Addin
#addin nuget:?package=Ibang.Platform.Common.Infrastructure&version=1.0.27.72

// Install Ibang.Platform.Common.Infrastructure as a Cake Tool
#tool nuget:?package=Ibang.Platform.Common.Infrastructure&version=1.0.27.72

Se agrega el metodo AddOrUpdateRange al repositorio genérico


        public void AddOrUpdateRange(List<A> contracts)
        {
            List<T> entities = _mapper.Map<List<A>, List<T>>(contracts);

            foreach (var entity in entities)
            {
                var entry = Entities.Entry(entity);

                if (entry.State == EntityState.Detached)
                {
                    Entities.Set<T>().Attach(entity);
                    entry.State = EntityState.Modified;
                }
            }

            Entities.Set<T>().AddRange(entities);
            Save();
            Entities.Database.CloseConnection();
        }

#Este método AddOrUpdateRange parece diseñado para agregar o actualizar un conjunto de entidades en una base de datos utilizando Entity Framework. #Aquí está la explicación paso a paso del código:

#Creación de entidades desde contratos (_mapper.Map):

#List<T> entities = _mapper.Map<List<A>, List<T>>(contracts);: Utiliza un objeto Mapper (posiblemente de AutoMapper u otro mapeador) para convertir #una lista de objetos del tipo A a una lista de objetos del tipo T. La clase T probablemente represente la entidad del modelo de datos que se mapea desde #los contratos (A).
#Adjuntar entidades al contexto si están desvinculadas:

foreach (var entity in entities) { ... }: Itera sobre la lista de entidades mapeadas.
var entry = Entities.Entry(entity);: Obtiene la entrada correspondiente a la entidad en el contexto.
if (entry.State == EntityState.Detached) { ... }: Verifica si la entidad está desvinculada (Detached) del contexto.
Entities.Set<T>().Attach(entity);: Si la entidad está desvinculada, la adjunta al contexto.
entry.State = EntityState.Modified;: Establece el estado de la entidad como modificado. Esto es necesario para que Entity Framework sepa que la entidad se ha cambiado y debe actualizarse en la base de datos.
Agregar las entidades al contexto y guardar cambios:

Entities.Set<T>().AddRange(entities);: Agrega todas las entidades (ya sea las adjuntadas o las recién creadas) al contexto.
Save();: Llama al método Save, que probablemente contiene la lógica para guardar los cambios en la base de datos.
Cerrar la conexión a la base de datos:

Entities.Database.CloseConnection();: Cierra la conexión a la base de datos. Esto puede ser útil si se quiere liberar recursos de conexión después de realizar las operaciones.
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 netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Ibang.Platform.Common.Infrastructure:

Package Downloads
Ibang.Platform.Common.Domain

Package Description

Ibang.Platform.Common.Configuration

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.29.9 48 5/9/2024
1.0.29.8 52 5/8/2024
1.0.29.7 39 5/8/2024
1.0.29.6 78 5/8/2024
1.0.29.5 73 5/7/2024
1.0.29.4 88 4/29/2024
1.0.29.3 98 4/29/2024
1.0.29.2 135 4/23/2024
1.0.29.1 136 4/18/2024
1.0.28.44 144 4/18/2024
1.0.28.43 76 4/18/2024
1.0.28.42 150 4/17/2024
1.0.28.41 106 4/15/2024
1.0.28.40 113 4/15/2024
1.0.28.39 88 4/11/2024
1.0.28.38 84 4/11/2024
1.0.28.37 81 4/11/2024
1.0.28.36 104 4/11/2024
1.0.28.35 102 4/8/2024
1.0.28.34 127 4/2/2024
1.0.28.33 120 4/2/2024
1.0.28.32 77 4/2/2024
1.0.28.31 109 4/2/2024
1.0.28.30 109 4/2/2024
1.0.28.29 117 4/2/2024
1.0.28.28 206 3/19/2024
1.0.28.27 92 3/19/2024
1.0.28.26 121 3/18/2024
1.0.28.25 173 3/12/2024
1.0.28.24 90 3/12/2024
1.0.28.23 97 3/12/2024
1.0.28.22 233 3/10/2024
1.0.28.21 109 3/6/2024
1.0.28.20 116 3/5/2024
1.0.28.19 114 3/5/2024
1.0.28.18 112 3/5/2024
1.0.28.17 100 3/5/2024
1.0.28.16 286 3/5/2024
1.0.28.15 88 3/4/2024
1.0.28.14 99 3/4/2024
1.0.28.13 98 3/3/2024
1.0.28.12 106 3/3/2024
1.0.28.11 99 3/1/2024
1.0.28.10 136 3/1/2024
1.0.28.9 96 3/1/2024
1.0.28.8 116 2/28/2024
1.0.28.7 121 2/28/2024
1.0.28.6 114 2/28/2024
1.0.28.1 81 3/1/2024
1.0.27.95 153 2/19/2024
1.0.27.94 93 2/16/2024
1.0.27.93 280 2/15/2024
1.0.27.92 146 2/13/2024
1.0.27.91 235 2/13/2024
1.0.27.90 233 2/12/2024
1.0.27.89 139 2/10/2024
1.0.27.88 125 2/9/2024
1.0.27.87 106 2/7/2024
1.0.27.86 381 1/26/2024
1.0.27.85 241 1/24/2024
1.0.27.84 98 1/24/2024
1.0.27.83 112 1/19/2024
1.0.27.82 350 1/19/2024
1.0.27.81 263 1/18/2024
1.0.27.80 110 1/18/2024
1.0.27.79 242 1/18/2024
1.0.27.78 108 1/15/2024
1.0.27.77 102 1/11/2024
1.0.27.76 106 1/11/2024
1.0.27.75 121 1/9/2024
1.0.27.74 167 1/4/2024
1.0.27.73 156 12/21/2023
1.0.27.72 161 12/21/2023
1.0.27.71 507 12/13/2023
1.0.27.70 475 12/11/2023
1.0.27.69 122 12/7/2023
1.0.27.68 133 12/4/2023
1.0.27.67 132 12/1/2023
1.0.27.66 132 11/28/2023
1.0.27.65 401 11/27/2023
1.0.27.64 111 11/27/2023
1.0.27.63 357 11/27/2023
1.0.27.62 361 11/24/2023
1.0.27.61 367 11/24/2023
1.0.27.60 419 11/16/2023
1.0.27.59 170 11/14/2023
1.0.27.58 151 10/30/2023
1.0.27.57 114 10/30/2023
1.0.27.56 146 10/9/2023
1.0.27.55 155 10/5/2023
1.0.27.54 208 10/5/2023
1.0.27.53 151 10/3/2023
1.0.27.52 140 10/3/2023
1.0.27.51 136 10/2/2023
1.0.27.50 129 10/2/2023
1.0.27.49 117 9/27/2023
1.0.27.48 129 9/27/2023
1.0.27.47 492 9/22/2023
1.0.27.46 120 9/15/2023
1.0.27.45 217 9/7/2023
1.0.27.44 509 9/5/2023
1.0.27.43 142 8/28/2023
1.0.27.42 153 8/24/2023
1.0.27.41 137 8/24/2023
1.0.27.40 186 8/11/2023
1.0.27.39 163 8/11/2023
1.0.27.38 181 8/3/2023
1.0.27.37 155 8/3/2023
1.0.27.36 152 8/3/2023
1.0.27.35 213 8/3/2023
1.0.27.34 175 8/2/2023
1.0.27.33 166 8/2/2023
1.0.27.32 220 7/28/2023
1.0.27.31 182 7/25/2023
1.0.27.30 173 7/25/2023
1.0.27.29 174 7/25/2023
1.0.27.28 175 7/25/2023
1.0.27.27 247 7/18/2023
1.0.27.26 177 7/17/2023
1.0.27.25 192 7/14/2023
1.0.27.24 160 7/13/2023
1.0.27.23 206 6/20/2023
1.0.27.22 725 6/20/2023
1.0.27.21 692 6/16/2023
1.0.27.20 206 6/2/2023
1.0.27.19 325 4/21/2023
1.0.27.18 241 4/20/2023
1.0.27.17 374 3/24/2023
1.0.27.16 287 3/16/2023
1.0.27.15 801 3/13/2023
1.0.27.14 302 3/9/2023
1.0.27.13 345 3/7/2023
1.0.27.12 826 3/6/2023
1.0.27.11 791 3/6/2023
1.0.27.10 291 3/2/2023
1.0.27.9 323 2/28/2023
1.0.27.8 298 2/24/2023
1.0.27.7 429 2/21/2023
1.0.27.6 415 2/21/2023
1.0.27.5 821 2/18/2023
1.0.27.4 424 2/13/2023
1.0.27.3 509 2/13/2023
1.0.27.2 373 2/13/2023
1.0.27.1 435 2/13/2023
1.0.26.21 870 2/17/2023
1.0.26.20 1,296 2/16/2023
1.0.26.19 510 2/13/2023
1.0.26.18 394 1/18/2023
1.0.26.17 403 1/18/2023
1.0.26.16 431 1/18/2023
1.0.26.14 520 1/18/2023
1.0.26.13 370 1/17/2023
1.0.26.12 370 1/17/2023
1.0.26.11 333 1/17/2023
1.0.26.10 338 1/17/2023
1.0.26.9 400 1/16/2023
1.0.26.8 375 1/16/2023
1.0.26.7 365 1/16/2023
1.0.26.6 497 1/16/2023
1.0.26.5 362 1/16/2023
1.0.26.4 362 1/16/2023
1.0.26.3 365 1/16/2023
1.0.26.2 374 1/16/2023
1.0.26.1 365 1/16/2023
1.0.26 378 1/16/2023
1.0.25.99 511 1/13/2023
1.0.25.98 373 1/6/2023
1.0.25.97 532 1/5/2023
1.0.25.96 413 12/21/2022
1.0.25.95 405 12/20/2022
1.0.25.94 381 12/20/2022
1.0.25.93 401 12/15/2022
1.0.25.92 423 12/15/2022
1.0.25.91 361 12/15/2022
1.0.25.90 950 12/15/2022
1.0.25.89 927 12/15/2022
1.0.25.87 403 12/12/2022
1.0.25.85 368 12/12/2022
1.0.25.84 341 12/12/2022
1.0.25.83 385 12/12/2022
1.0.25.82 423 12/9/2022
1.0.25.81 359 12/7/2022
1.0.25.80 343 12/7/2022
1.0.25.79 393 12/7/2022
1.0.25.78 713 12/6/2022
1.0.25.77 393 12/5/2022
1.0.25.76 514 12/5/2022
1.0.25.75 418 11/21/2022
1.0.25.74 413 11/21/2022
1.0.25.73 391 11/21/2022
1.0.25.72 561 11/21/2022
1.0.25.71 459 11/17/2022
1.0.25.70 440 11/16/2022
1.0.25.69 400 11/16/2022
1.0.25.68 387 11/11/2022
1.0.25.67 602 11/9/2022
1.0.25.66 449 11/9/2022
1.0.25.65 430 11/9/2022
1.0.25.64 464 11/9/2022
1.0.25.63 404 11/8/2022
1.0.25.62 524 10/20/2022
1.0.25.61 527 10/20/2022
1.0.25.60 491 10/20/2022
1.0.25.59 537 9/22/2022
1.0.25.58 577 9/22/2022
1.0.25.57 593 9/19/2022
1.0.25.56 579 9/19/2022
1.0.25.55 582 9/13/2022
1.0.25.54 576 9/7/2022
1.0.25.53 572 9/7/2022
1.0.25.52 582 9/7/2022
1.0.25.51 572 9/7/2022
1.0.25.50 548 9/5/2022
1.0.25.49 510 9/5/2022
1.0.25.48 542 9/5/2022
1.0.25.47 565 9/5/2022
1.0.25.46 541 9/5/2022
1.0.25.45 568 8/24/2022
1.0.25.44 575 8/24/2022
1.0.25.43 582 8/1/2022
1.0.25.42 588 7/25/2022
1.0.25.41 577 7/20/2022
1.0.25.40 634 7/14/2022
1.0.25.39 636 7/13/2022
1.0.25.38 589 7/13/2022
1.0.25.37 622 6/29/2022
1.0.25.36 609 6/28/2022
1.0.25.35 599 6/23/2022
1.0.25.34 621 6/21/2022
1.0.25.33 600 6/21/2022
1.0.25.32 610 6/3/2022
1.0.25.31 681 6/1/2022
1.0.25.30 654 5/31/2022
1.0.25.29 673 5/20/2022
1.0.25.28 617 5/20/2022
1.0.25.27 652 5/19/2022
1.0.25.26 723 2/10/2022
1.0.25.25 746 2/3/2022
1.0.25.24 755 1/24/2022
1.0.25.23 778 1/17/2022
1.0.25.22 644 1/14/2022
1.0.25.21 627 1/13/2022
1.0.25.20 1,043 1/13/2022
1.0.25.19 464 1/8/2022
1.0.25.18 439 1/3/2022
1.0.25.17 503 12/10/2021
1.0.25.16 479 12/10/2021
1.0.25.15 496 12/7/2021
1.0.25.14 1,449 12/1/2021
1.0.25.13 467 11/30/2021
1.0.25.12 530 11/30/2021
1.0.25.11 1,135 11/29/2021
1.0.25.10 499 11/29/2021
1.0.25.9 3,295 11/24/2021
1.0.25.8 3,030 11/24/2021
1.0.25.7 4,043 11/24/2021
1.0.25.6 6,905 11/23/2021
1.0.25.5 489 11/22/2021
1.0.25.4 527 11/18/2021
1.0.25.3 547 11/18/2021
1.0.25.2 552 11/17/2021
1.0.25 6,821 11/23/2021
1.0.24.29 669 11/17/2021
1.0.24.28 557 11/10/2021
1.0.24.27 769 11/5/2021
1.0.24.26 546 11/4/2021
1.0.24.25 577 11/4/2021
1.0.24.24 622 10/28/2021
1.0.24.23 601 10/19/2021
1.0.24.22 572 10/19/2021
1.0.24.21 590 10/19/2021
1.0.24.20 630 10/11/2021
1.0.24.19 649 10/11/2021
1.0.24.18 646 10/11/2021
1.0.24.17 609 10/11/2021
1.0.24.16 641 10/8/2021
1.0.24.15 585 10/6/2021
1.0.24.14 598 10/6/2021
1.0.24.13 572 10/6/2021
1.0.24.12 858 10/6/2021
1.0.24.11 637 9/30/2021
1.0.24.10 662 9/24/2021
1.0.24.9 590 9/16/2021
1.0.24.8 860 9/9/2021
1.0.24.7 560 9/9/2021
1.0.24.6 861 9/9/2021
1.0.24.5 811 8/23/2021
1.0.24.4 1,036 8/23/2021
1.0.24.2 547 8/9/2021
1.0.24.1 602 7/29/2021
1.0.23.6 615 8/9/2021
1.0.23.5 473 8/9/2021
1.0.23.4 624 7/14/2021
1.0.23.3 915 7/13/2021
1.0.23.2 814 7/13/2021
1.0.23.1 829 7/12/2021
1.0.22.54 612 7/12/2021
1.0.22.53 911 7/12/2021
1.0.22.52 687 6/28/2021
1.0.22.51 864 6/25/2021
1.0.22.50 594 6/22/2021
1.0.22.49 602 6/21/2021
1.0.22.48 648 6/17/2021
1.0.22.47 630 6/17/2021
1.0.22.46 1,121 4/28/2021
1.0.22.45 483 4/27/2021
1.0.22.44 533 4/27/2021
1.0.22.43 749 4/22/2021
1.0.22.42 1,178 4/21/2021
1.0.22.41 1,192 4/13/2021
1.0.22.40 1,215 4/13/2021
1.0.22.39 1,477 4/13/2021
1.0.22.38 603 4/7/2021
1.0.22.37 609 4/7/2021
1.0.22.36 633 4/7/2021
1.0.22.35 540 4/7/2021
1.0.22.34 533 4/5/2021
1.0.22.33 743 4/5/2021
1.0.22.32 881 3/25/2021
1.0.22.31 601 3/25/2021
1.0.22.30 602 3/25/2021
1.0.22.29 604 3/25/2021
1.0.22.28 582 3/25/2021
1.0.22.27 568 3/25/2021
1.0.22.26 600 3/25/2021
1.0.22.25 537 3/24/2021
1.0.22.24 587 3/24/2021
1.0.22.23 579 3/23/2021
1.0.22.22 594 3/23/2021
1.0.22.21 572 3/23/2021
1.0.22.20 779 3/23/2021
1.0.22.19 1,170 3/19/2021
1.0.22.18 566 3/18/2021
1.0.22.17 525 3/17/2021
1.0.22.16 1,259 3/11/2021
1.0.22.15 1,250 3/11/2021
1.0.22.14 769 3/9/2021
1.0.22.13 835 3/9/2021
1.0.22.12 1,171 3/1/2021
1.0.22.11 1,197 3/1/2021
1.0.22.10 602 2/26/2021
1.0.22.9 1,303 2/23/2021
1.0.22.8 1,331 2/23/2021
1.0.22.7 1,449 2/20/2021
1.0.22.6 1,241 2/20/2021
1.0.22.5 1,384 2/18/2021
1.0.22.4 1,336 2/18/2021
1.0.22.3 606 2/4/2021
1.0.22.2 566 1/27/2021
1.0.22.1 659 1/27/2021
1.0.22 1,313 1/27/2021
1.0.21.2 560 1/22/2021
1.0.21.1 677 1/22/2021
1.0.21 626 1/12/2021
1.0.20.9 593 1/12/2021
1.0.20.8 664 1/6/2021
1.0.20.7 692 1/5/2021
1.0.20.6 623 12/16/2020
1.0.20.5 647 11/27/2020
1.0.20.4 653 11/13/2020
1.0.20.3 650 11/12/2020
1.0.20.2 869 10/27/2020
1.0.20.1 675 10/22/2020
1.0.20 636 10/22/2020
1.0.19.21 611 10/15/2020
1.0.19.20 688 10/14/2020
1.0.19.19 1,617 10/11/2020
1.0.19.18 871 10/5/2020
1.0.19.17 1,109 10/1/2020
1.0.19.16 717 9/30/2020
1.0.19.15 673 9/30/2020
1.0.19.14 687 9/30/2020
1.0.19.13 684 9/30/2020
1.0.19.12 1,289 9/27/2020
1.0.19.11 1,567 9/27/2020
1.0.19.10 695 9/23/2020
1.0.19.9 686 9/23/2020
1.0.19.8 700 9/8/2020
1.0.19.7 721 9/7/2020
1.0.19.6 716 9/7/2020
1.0.19.5 704 9/4/2020
1.0.19.4 1,201 8/19/2020
1.0.19.3 617 8/19/2020
1.0.19.2 634 8/18/2020
1.0.19.1 656 8/18/2020
1.0.18.13 787 9/4/2020
1.0.18.12 745 9/4/2020
1.0.18.11 833 7/24/2020
1.0.18.10 757 7/8/2020
1.0.18.9 719 7/8/2020
1.0.18.8 921 7/3/2020
1.0.18.7 677 7/3/2020
1.0.18.6 1,182 6/20/2020
1.0.18.5 766 6/18/2020
1.0.18.4 760 6/18/2020
1.0.18.3 694 6/17/2020
1.0.18.2 725 6/17/2020
1.0.18.1 947 6/17/2020
1.0.18 722 6/12/2020
1.0.17.9 1,345 6/18/2020
1.0.17.8 807 6/7/2020
1.0.17.7 754 6/5/2020
1.0.17.6 808 6/4/2020
1.0.17.5 737 5/19/2020
1.0.17.4 690 5/19/2020
1.0.17.3 717 5/19/2020
1.0.17.2 719 5/19/2020
1.0.17.1 709 5/18/2020
1.0.17 690 5/18/2020
1.0.16.1 1,086 5/18/2020
1.0.16 1,098 5/15/2020
1.0.15.8 701 5/7/2020
1.0.15.7 992 4/23/2020
1.0.15.6 719 4/23/2020
1.0.15.5 717 4/22/2020
1.0.15.4 713 4/22/2020
1.0.15.3 647 4/22/2020
1.0.15.2 667 4/21/2020
1.0.15.1 680 4/20/2020
1.0.14.22 710 6/1/2020
1.0.14.21 658 5/21/2020
1.0.14.20 901 3/26/2020
1.0.14.19 1,669 3/19/2020
1.0.14.18 775 3/12/2020
1.0.14.17 726 3/12/2020
1.0.14.16 723 3/12/2020
1.0.14.15 697 3/12/2020
1.0.14.14 1,051 2/20/2020
1.0.14.13 714 2/20/2020
1.0.14.12 765 2/20/2020
1.0.14.11 944 2/20/2020
1.0.14.10 715 2/19/2020
1.0.14.9 818 2/17/2020
1.0.14.8 735 2/11/2020
1.0.14.7 1,579 2/5/2020