Skip to content

Commit

Permalink
Merge branch 'main' into users/ZafarUrakov/coderub-rename-test-projects
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdutoit authored Jan 30, 2024
2 parents c36982d + fbcd393 commit 62b6613
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 4 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
![STX.EFxceptions.Cosmos](https://raw.githubusercontent.com/The-Standard-Organization/STX.EFxceptions.Cosmos/main/Resources/Images/stx.efCosmos_git_logo.png)

[![.Net](https://github.com/The-Standard-Organization/STX.EFxceptions.Cosmos/actions/workflows/dotnet.yml/badge.svg)](https://github.com/The-Standard-Organization/STX.EFxceptions.Cosmos/actions/workflows/dotnet.yml)
[![The Standard](https://img.shields.io/github/v/release/hassanhabib/The-Standard?filter=v2.10.0&style=default&label=Standard%20Version&color=2ea44f)](https://github.com/hassanhabib/The-Standard)
[![The Standard - COMPLIANT](https://img.shields.io/badge/The_Standard-COMPLIANT-2ea44f)](https://github.com/hassanhabib/The-Standard)
[![The Standard Community](https://img.shields.io/discord/934130100008538142?color=%237289da&label=The%20Standard%20Community&logo=Discord)](https://discord.gg/vdPZ7hS52X)

# 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](https://github.com/The-Standard-Organization/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.

## 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.

## Current Outlook of the Project
In the outset of this endeavor we plan to re-write the existing popular library RESTFulSense to enhance and bring current to modern Standard compliancy.

## Contact

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

[Twitter](https://twitter.com/hassanrezkhabib)

[LinkedIn](https://www.linkedin.com/in/hassanrezkhabib/)

[E-Mail](mailto:[email protected])

### Important Notice
A special thanks to Mr. Hassan Habib and Mr. Christo du Toit for their continuing dedicated contributions.
Empty file added Resources/Diagrams/drawio.txt
Empty file.
Binary file added Resources/Images/EFxceptions-Cosmos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Images/EFxceptions-Cosmos_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Images/EFxceptions-Cosmos_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Images/EFxceptions-Cosmos_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Images/EFxceptions-Cosmos_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Images/stx.efCosmos_git_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Images/stx.efxCosmos.icns
Binary file not shown.
Binary file added Resources/Images/stx.efxCosmos.ico
Binary file not shown.
15 changes: 13 additions & 2 deletions STX.EFxceptions.Cosmos/EFxceptionsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Cosmos;
using Microsoft.EntityFrameworkCore;
using STX.EFxceptions.Core;
using STX.EFxceptions.Cosmos.Base.Brokers.DbErrorBroker;
using STX.EFxceptions.Cosmos.Base.Services.Foundations;
Expand All @@ -13,11 +14,21 @@ namespace STX.EFxceptions.Cosmos
{
public class EFxceptionsContext : DbContextBase<CosmosException>
{
public EFxceptionsContext(DbContextOptions<EFxceptionsContext> options)
: base(options)
{ }

protected EFxceptionsContext()
: base()
{ }

protected override IDbErrorBroker<CosmosException> CreateErrorBroker() =>
new CosmosErrorBroker();

protected override IEFxceptionService<CosmosException> CreateEFxceptionService(
IDbErrorBroker<CosmosException> errorBroker) =>
new CosmosEFxceptionService(errorBroker);
IDbErrorBroker<CosmosException> errorBroker)
{
return new CosmosEFxceptionService(errorBroker);
}
}
}
10 changes: 8 additions & 2 deletions STX.EFxceptions.Identity.Cosmos/EFxceptionsIdentityContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public class EFxceptionsIdentityContext<TUser, TRole, TKey>
where TRole : IdentityRole<TKey>
where TKey : IEquatable<TKey>
{
protected EFxceptionsIdentityContext()
public EFxceptionsIdentityContext(DbContextOptions options) : base(options)
{ }

public EFxceptionsIdentityContext(DbContextOptions options) : base(options)
protected EFxceptionsIdentityContext() : base()
{ }

protected override IDbErrorBroker<CosmosException> CreateErrorBroker() =>
Expand All @@ -48,6 +48,12 @@ public class EFxceptionsIdentityContext<
where TRoleClaim : IdentityRoleClaim<TKey>
where TUserToken : IdentityUserToken<TKey>
{
public EFxceptionsIdentityContext(DbContextOptions options) : base(options)
{ }

protected EFxceptionsIdentityContext() : base()
{ }

protected override IDbErrorBroker<CosmosException> CreateErrorBroker() =>
new CosmosErrorBroker();

Expand Down

0 comments on commit 62b6613

Please sign in to comment.