STX.EFxceptions.Cosmos.Base 0.1.6

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

// Install STX.EFxceptions.Cosmos.Base as a Cake Tool
#tool nuget:?package=STX.EFxceptions.Cosmos.Base&version=0.1.6                

STX.EFxceptions.Cosmos

.Net The Standard The Standard - COMPLIANT The Standard Community

STX.EFxceptions.Cosmos

Introduction

A Standardized .NET library that captures the exceptions thrown by the EntityFramework from a Cosmos DB and converts them into meaningful exceptions...

STX. EFXceptions.Core Implementation

STX.EFxceptions.Core

Standard-Compliance

This library was built according to The Standard. The library follows engineering principles, patterns and tooling as recommended by The Standard.

This library is also a community effort which involved many nights of pair-programming, test-driven development and in-depth exploration research and design discussions.

Installation

You can get STX.EFxceptions.Cosmos Nuget package by typing:

Install-Package STX.EFxceptions.Cosmos

You can get STX.EFxceptions.Identity.Cosmos Nuget package by typing:

Install-Package STX.EFxceptions.Identity.Cosmos

Integration

Replace your existing DbContext class with EFxceptionsContext (or your IdentityDbContext with EFxceptionIdentityContext) as follows:

Before:
    public partial class StorageBroker : DbContext, IStorageBroker
    {
        public StorageBroker(DbContextOptions<StorageBroker> options)
            : base(options) => this.Database.Migrate();
    }

After:
    public partial class StorageBroker : EFxceptionsContext, IStorageBroker
    {
        public StorageBroker(DbContextOptions<StorageBroker> options)
            : base(options) => this.Database.Migrate();
    }

Supported HTTP Status Codes

Code Meanings Exception
401 Unauthorized: Access denied. AuthenticationFailedException
403 Forbidden: No permission to access. AuthorizationFailedException
404 Not Found: Resource does not exist. ResourceNotFoundException
408 Request Timeout: Timed out waiting for response. RequestTimeoutException
409 Conflict: Document with same key already exists. DuplicateKeyException
412 Precondition Failed: Expected document condition not met. PreconditionFailedException
413 Payload Too Large: Document exceeds size limit. PayloadTooLargeException
423 Locked: Resource currently unavailable. ResourceLockedException
424 Dependency Failed: Dependency unable to meet requirements. DependencyFailedException
429 Too Many Requests: Rate limit exceeded. TooManyRequestsException
500 Internal Server Error: Server encountered an unexpected condition. InternalServerException
503 Service Unavailable: Server temporarily unable to handle request. ServiceUnavailableException

<br >

This library is forever growing as we add more exceptions and codes into it, we appreciate any contributions as there are so many codes we need to cover, so please stay tuned.

Standard-Promise

The most important fulfillment aspect in a Standard complaint system is aimed towards contributing to people, its evolution, and principles. An organization that systematically honors an environment of learning, training, and sharing knowledge is an organization that learns from the past, makes calculated risks for the future, and brings everyone within it up to speed on the current state of things as honestly, rapidly, and efficiently as possible.

We believe that everyone has the right to privacy, and will never do anything that could violate that right. We are committed to writing ethical and responsible software, and will always strive to use our skills, coding, and systems for the good. We believe that these beliefs will help to ensure that our software(s) are safe and secure and that it will never be used to harm or collect personal data for malicious purposes.

The Standard Community as a promise to you is in upholding these values.

Contact

If you have any suggestions, comments or questions, please feel free to contact me on:

Twitter

LinkedIn

E-Mail

Important Notice

A special thanks to Mr. Hassan Habib and Mr. Christo du Toit for their continuing dedicated contributions.

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 (2)

Showing the top 2 NuGet packages that depend on STX.EFxceptions.Cosmos.Base:

Package Downloads
STX.EFxceptions.Cosmos

A Standardized .NET library for Cosmos DB that captures the exceptions thrown by EntityFramework and converts them into meaningful exceptions...

STX.EFxceptions.Identity.Cosmos

A Standardized .NET library for Cosmos DB that implements AspNetCore.Identity, that captures the exceptions thrown by EntityFramework and converts them into meaningful exceptions...

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.6 148 4/29/2024
0.1.1 177 2/26/2024
0.1.0 140 1/31/2024

This beta release is a rewrite of the original EFxceptions library.