Coder Social home page Coder Social logo

aspnetrun / run-aspnetcore-microservices Goto Github PK

View Code? Open in Web Editor NEW
2.4K 2.4K 1.3K 2.99 MB

Microservices on .Net platforms which used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12

Home Page: https://www.udemy.com/course/microservices-architecture-and-implementation-on-dotnet/?couponCode=APRI24

License: MIT License

C# 73.28% Dockerfile 3.28% HTML 22.37% CSS 1.07%
api-gateway aspnet-core aspnet-web-api aspnetcore-microservices clean-architecture cqrs-pattern docker event-driven event-sourcing eventbus mediator-pattern micorservices microservices-architecture mongodb ocelot-gateway rabbitmq redis rest-api sql-server swagger

run-aspnetcore-microservices's People

Contributors

mehmetozkaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

run-aspnetcore-microservices's Issues

nuget error while running docker

Failed to download package 'System.IO.4.1.0' from 'https://api.nuget.org/v3-flatcontainer/system.io/4.1.0/system.io.4.1.0.nupkg'.
#0 240.8 The download of 'https://api.nuget.org/v3-flatcontainer/system.io/4.1.0/system.io.4.1.0.nupkg' timed out because no data was received for 60000ms.
#0 240.8 Exception of type 'System.TimeoutException' was thrown.
#0 240.8 Failed to download package 'System.Runtime.Extensions.4.3.0' from 'https://api.nuget.org/v3-flatcontainer/system.runtime.extensions/4.3.0/system.runtime.extensions.4.3.0.nupkg'.
#0 240.8 The download of 'https://api.nuget.org/v3-flatcontainer/system.runtime.extensions/4.3.0/system.runtime.extensions.4.3.0.nupkg' timed out because no data was received for 60000ms.

Error on running docker exec -it catalog-mongo /bin/bash

@mehmetozkaya
I am able to successfully install container for mongo DB and but executing command for mongo DB throws below error.

C:\Users\ashishjain4>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
039ab1536008 mongo "mongod --bind_ip_all" 39 seconds ago Up 36 seconds 0.0.0.0:27017->27017/tcp catalog-mongo

C:\Users\ashishjain4>docker exec -it catalog-mongo /bin/bash

container bce995a3638f836b3ddf864e0bf002c658f5c3901264a444f8b89b0fd6e80f16 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF6F18F9D2B: (caller: 00007FF6F18AE13A) Exception(9) tid(3f4) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"/bin/bash","WorkingDirectory":"/","Environment":{"MONGO_DOWNLOAD_SHA256":"d811282527bbdc3266244209ad0971c0d375dbb209bb8eb4ae66ba576b19e9f6","MONGO_DOWNLOAD_URL":"https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-4.4.3-signed.msi","MONGO_VERSION":"4.4.3"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[0,0]}

image

Transaction in ordering

hi
How do I create a transaction in the handle?
Given that OrderDbContext is in the Infrastructure layer.
Transactions can be managed using Behaviours, but I do not have access to Infrastructure in the application layer

connection timeout in pulling elasticsearch:7.9.2 and kibana:7.9.2

Hello,

I have been starting to use the project recently, which is great, but I have noticed connection timeout in pulling elasticsearch:7.9.2 and kibana:7.9.2. I think it would be better to use official images from hub.docker.com.
The availability and stability of Docker Hub are much more than other repositories.

Capture
Capture2

I'm going to link a pull request to the issue, which was tested perfectly.

Error in docker compose ?

docker-compose -f docker-compose.yml -f docker-compose.override.yml up –d

WARNING: The WEBAPP_STORAGE_HOME variable is not set. Defaulting to a blank string.
WARNING: The HOME variable is not set. Defaulting to a blank string.
Creating network "run-aspnetcore-microservices_default" with the default driver
ERROR: No such service: –d

Edit Documentation Telling Devs To Turn Off Docker's "Experimental Features"

This error message is all I kept getting when running the following command:
Command => docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
Error Message => “Error response from daemon: Get https://registry-1.docker.io/v2/: 3 net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

THE FIX
Docker Dashboard -> Settings -> Experimental -> Uncheck "Use New Experimental Framework".

Screen Shot 2021-07-25 at 1 11 05 PM

See link: FIX from Referenced Article found on forums.docker.com

Login error when creating seed data (but only) when Ordering.API runs in Docker. Once manually created, it runs correctly

For some reason when I run the Ordering.API's GET command to retrieve the orders I getting the following error

.SqlException (0x80131904): Cannot open database "OrderDb" requested by the login. The login failed.

However, if I run the same code from Visual Studio targeting the same database, the database gets created with seed data with no problem. After that... once with the seed data created by the instance running with Visual Studio, if I switch back to the OrderingAPI running in Docker and run GET orders again then I do see the seed data.


workaround solution applied;
4886401


Need stable solution.

ERROR: for shopping.aggregator Cannot start service shopping.aggregator: Ports are not available: listen tcp 0.0.0.0:8005:

After running "docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d", I am getting following error ->
discount.api is up-to-date
basket.api is up-to-date
ocelotapigw is up-to-date
Starting shopping.aggregator ...
Starting shopping.aggregator ... error

ERROR: for shopping.aggregator Cannot start service shopping.aggregator: Ports are not available: listen tcp 0.0.0.0:8005: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

ERROR: for shopping.aggregator Cannot start service shopping.aggregator: Ports are not available: listen tcp 0.0.0.0:8005: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
ERROR: Encountered errors while bringing up the project.

Could you please help me on this?

RabbitMQ exchange type is fanout

Even we are using topic exchange model which is pub/sub pattern implementation. It seems fanout on RabbitMQ when send basketcheckout event to queue in the RabbitMQ Dashboard.
Need to investigate - udemy -128

System.TimeoutException error when I run Catalog.API

I get this error when I run Catalog.API solution

ducker installed and the container is working...

System.TimeoutException: 'A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/catalogdb:27017" }", EndPoint: "Unspecified/catalogdb:27017", ReasonChanged: "Heartbeat", State: "Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Sockets.SocketException (11001): No such host is known. at System.Net.NameResolutionPal.ProcessResult(SocketError errorCode, GetAddrInfoExContext* context) at System.Net.NameResolutionPal.GetAddressInfoExCallback(Int32 error, Int32 bytes, NativeOverlapped* overlapped) --- End of stack trace from previous location --- at MongoDB.Driver.Core.Connections.TcpStreamFactory.ResolveEndPointsAsync(EndPoint initial) at MongoDB.Driver.Core.Connections.TcpStreamFactory.CreateStreamAsync(EndPoint endPoint, CancellationToken cancellationToken) at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelperAsync(CancellationToken cancellationToken) --- End of inner exception stack trace --- at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelperAsync(CancellationToken cancellationToken) at MongoDB.Driver.Core.Servers.ServerMonitor.InitializeConnectionAsync(CancellationToken cancellationToken) at MongoDB.Driver.Core.Servers.ServerMonitor.HeartbeatAsync(CancellationToken cancellationToken)", LastHeartbeatTimestamp: "2021-06-23T18:18:01.2912448Z", LastUpdateTimestamp: "2021-06-23T18:18:01.2912453Z" }] }.'

grpc version is not compatible with m1 macbook

hi. i'm using macbook air 2020 with m1 processor for this project. and i'm facing one issue that tells me

Google.Protobuf.Tools cannot determine host OS and CPU

after searching for a while i found that Grpc.AspNetCore version in cloned project (2.35.0) isn't supporting arm processors.
so change the code to:
<PackageReference Include="Grpc.AspNetCore" Version="2.44.0" />
in Discount.Grpc and Basket.API.
Thanks

Communication Between two microservices using ASP.Net Core WebApi

I have two Microservices. First Service for Customers and Second service for Invoice Service.

In Invoice MicroService, I will save only CustomerId in Invoice services. Using this CustomerId, I would like to retrieve all the related data for Customer Microservice. But i don't know to communicate async.

Any please get me some ideas and examples

Provide a better redirect in docker-compose...

Invoking any link you provide in the write up causes the error:

This site can’t be reachedhost.docker.internal’s server IP address could not be found.
Try:

Checking the connection
Checking the proxy, firewall, and DNS configuration
Running Windows Network Diagnostics
ERR_NAME_NOT_RESOLVED

Remove "event-sourcing" tag

I suggest removing the "event-sourcing" tag from the project as it does not exemplify this. The persistence mechanism present in the project is the Relational paradigm.

Ocelot's and docker-compose is not support each other configurations

Hello. I'm here to tell you the ocelot.json configuration is wrong by this Docker and docker-compose files.
Your host and Ports are using the Docker internal network but I didn't see your config write this network bridge.
we've 2 ways to solve this problem:

First:

  1. change all Host and Ports that you've written in the Ocelot ReRoutes configuration to this config so don't need network-bridge anymore:
    Host: "host.docker.internal"
    Port: "the exposed port in docker-compose file"

I think this will work right.

the final Sample ocelot.json file after I have just changed Host and Ports

"DownstreamPathTemplate": "/api/v1/Discount/{productName}", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "host.docker.internal", "Port": 5003 //this port have exposed in docker-compose.override.yml file }

Second:

  1. create a network bridge in docker-compose and then use that network for all containers.
    In this way, ocelot will use Internal docker network that knows the Host and Ports.

Done.

the final Sample ocelot.json file after I have created the network-bridge

"DownstreamPathTemplate": "/api/v1/Discount/{productName}", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "discount_api", // My container_name "Port": 80 //this port have exposed in DockerFile }

if you have any questions let's be easy and ask.

upgrade to dot net 6

this project need upgrade to .NET 6
with new future like (distribute, and local transaction , identity server ,...)

SQl server Database is not connected using docker compose

I am trying last 3 days sql server database connectivity not work

compose file below

orderdb:
container_name: orderdb
environment:
SA_PASSWORD: "SwN12345678"
ACCEPT_EULA: "Y"
restart: always
ports:
- "1433:1433"

ordering.api:
container_name: ordering.api
environment:
- ASPNETCORE_ENVIRONMENT=Development
- "ConnectionStrings:OrderingConnectionString=Server=orderdb;Database=OrderDb;User Id=sa;Password=SwN12345678"
- "EventBusSettings:HostAddress=amqp://guest:guest@rabbitmq:5672"
- "ElasticConfiguration:Uri=http://elasticsearch:9200"
depends_on:
- orderdb
- rabbitmq
ports:
- "8004:80"

I have not use entity framework I am using dapper

I have check API connection string is "Server=orderdb;Database=OrderDb;User Id=sa;Password=SwN12345678"

error given is docker-compose database container file Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'OrderDb'. [CLIENT: 172.20.0.3]

How to fix this issues

I have try to remove orderdb and try this host.docker.internal,1433 working fine so how to multicontainer setup

Email service does not work

Based on your coding, the service related to receiving the email settings in section (InfrastructureServiceRegistartion) will not be returned, please help.

image

InvalidOperationException in GetProductByCategory

Hi,

I followed the course with all the steps from version 3.1 until the video 22. Developing Presentation Layer - Create CatalogController Class for Catalog.API.
When I opened the course today, I realized that you updated the videos to .Net 5. I followed them in order to make it compatible (added Swashbuckle support, made some minor changes in Startup.cs and tried to run as you indicated).
When I run the microservice, it opens and the methods work except GetProductByCategory. It returns the following Exception:

An unhandled exception has occurred while executing the request.
      System.InvalidOperationException: The serializer for field 'Category' must implement IBsonArraySerializer and provide item serialization info.
         at MongoDB.Driver.ElementMatchFilterDefinition`2.Render(IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry)
         at MongoDB.Driver.MongoCollectionImpl`1.CreateFindOperation[TProjection](FilterDefinition`1 filter, FindOptions`2 options)
         at MongoDB.Driver.MongoCollectionImpl`1.FindAsync[TProjection](IClientSessionHandle session, FilterDefinition`1 filter, FindOptions`2 options, CancellationToken cancellationToken)
         at MongoDB.Driver.MongoCollectionImpl`1.<>c__DisplayClass47_0`1.<FindAsync>b__0(IClientSessionHandle session)
         at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSessionAsync[TResult](Func`2 funcAsync, CancellationToken cancellationToken)
         at MongoDB.Driver.IAsyncCursorSourceExtensions.ToListAsync[TDocument](IAsyncCursorSource`1 source, CancellationToken cancellationToken)
         at Catalog.API.Repositories.ProductRepository.GetProductsByCategory(String categoryName) in D:\dev\github\viniciusdesa\udemy-microsvcs-arch-n-impl\Udemy_MicroservicesArch\src\Catalog\Catalog.API\Repositories\ProductRepository.cs:line 51
         at Catalog.API.Controllers.CatalogController.GetProductByCategory(String category) in D:\dev\github\viniciusdesa\udemy-microsvcs-arch-n-impl\Udemy_MicroservicesArch\src\Catalog\Catalog.API\Controllers\CatalogController.cs:line 56
         at lambda_method29(Closure , Object )
         at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)         at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
         at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
         at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
         at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
         at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

What could be wrong?
Follow a link to my code: https://github.com/viniciusdesa/udemy-microsvcs-arch-n-impl/tree/master/Udemy_MicroservicesArch/src/Catalog/Catalog.API

Best regards,

Vinicius

Course??

Do you have course for deploy this repo using azure services??

Cannot complete the docker compose on windows

Here is the error:
Step 8/17 : RUN dotnet restore "Services/Catalog/Catalog.API/Catalog.API.csproj"
---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested
---> Running in bb777ca8a775
Determining projects to restore...
Restored /src/BuildingBlocks/Common.Logging/Common.Logging.csproj (in 53.58 sec).
Restored /src/Services/Catalog/Catalog.API/Catalog.API.csproj (in 57.46 sec).
The command '/bin/sh -c dotnet restore "Services/Catalog/Catalog.API/Catalog.API.csproj"' returned a non-zero code: 4294967295: failed to shutdown container: container bb777ca8a775dd3fb8f2bec7e328dc231e527aa485fb8f91c3c75c3a192e7e85 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container bb777ca8a775dd3fb8f2bec7e328dc231e527aa485fb8f91c3c75c3a192e7e85 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)
ERROR: Service 'catalog.api' failed to build : Build failed
ERROR: Service 'catalog.api' failed to build : Build failed

Ordering Health Check fails on ARM64

Hi @mehmetozkaya,

I have tried to deploy run-aspnetcore-microservices on ARM64 using docker-compose. In docker-compose.yml file, there is one service named OrderDB which is using mcr.microsoft.com/mssql/server:2017-latest docker image. This image is not present for ARM64. I have commented regarding the release of the image. In that comment, an user suggested to use azure-sql-edge docker image instead of mcr.microsoft.com/mssql/server:2017-latest. After replacing it with azure-sql-edge all the health-checks are working fine.

Can you please share your opinion on the above change?

error pulling image configuration

If you get this error running the command
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
disable "Use Docker Compose V2" in docker settings

image

Unable to load the service index for source

Team, I am getting below error in windows machine while running the docker compose command

[webstatus build 4/7] RUN dotnet restore "WebApps/WebStatus/WebStatus.csproj":
1.703 Determining projects to restore...
2.733 /usr/share/dotnet/sdk/5.0.408/NuGet.targets(131,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/src/WebApps/WebStatus/WebStatus.csproj]
2.733 /usr/share/dotnet/sdk/5.0.408/NuGet.targets(131,5): error : The SSL connection could not be established, see inner exception. [/src/WebApps/WebStatus/WebStatus.csproj]
2.733 /usr/share/dotnet/sdk/5.0.408/NuGet.targets(131,5): error : The remote certificate is invalid because of errors in the certificate chain: PartialChain [/src/WebApps/WebStatus/WebStatus.csproj]



[discount.grpc build 5/8] RUN dotnet restore "Services/Discount/Discount.Grpc/Discount.Grpc.csproj":
1.724 Determining projects to restore...
2.743 /usr/share/dotnet/sdk/5.0.408/NuGet.targets(131,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj]
2.743 /usr/share/dotnet/sdk/5.0.408/NuGet.targets(131,5): error : The SSL connection could not be established, see inner exception. [/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj]
2.743 /usr/share/dotnet/sdk/5.0.408/NuGet.targets(131,5): error : The remote certificate is invalid because of errors in the certificate chain: PartialChain [/src/Services/Discount/Discount.Grpc/Discount.Grpc.csproj]`

No such service build

WARNING: The WEBAPP_STORAGE_HOME variable is not set. Defaulting to a blank string.
WARNING: The HOME variable is not set. Defaulting to a blank string.
ERROR: No such service: build

can't connect in Windows 11?

image
Just pulled all the file and run the docker compose. But can't connect with any API...
It says 404, any idea?

can you ensure Basket checkout atomicity

in basket api basketcontroller Checkout:


var basket = await _repository.GetBasket(basketCheckout.UserName);
if (basket == null)
{
return BadRequest();
}

        // send checkout event to rabbitmq
        var eventMessage = _mapper.Map<BasketCheckoutEvent>(basketCheckout);
        eventMessage.TotalPrice = basket.TotalPrice;
        await _publishEndpoint.Publish<BasketCheckoutEvent>(eventMessage);

        // remove the basket
        await _repository.DeleteBasket(basket.UserName);

        return Accepted();

if MassTransit publish or IBasketRepository delete fail,the checkout business is fail . can you use the transcation to achieve
checkout 's atomicity ,fianlly this is comply eventual consistency,
thank you!

Possible invalid lifetime for EmailService

According to the course lectures, the reasoning behind registering the email service as transient is to prevent the service from being created for every request and to use a single instance throughout the application lifetime. This means that the service must be registered as singleton since transient means a new instance will be created EVERY TIME the service is requested from the dependency injection framework.
Code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.