-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Kengwang edited this page Jan 29, 2024
·
3 revisions
Welcome to use Depository!
You can easily get Depository
from nuget
dotnet add package Depository
Then, you can create a Depository using DepositoryFactory
This will add Depository
as IDepository
into Depository so you can resolve it
var depository = DepositoryFactory.CreateNew();
You can add then add Your first dependency
depository.AddSingleton<IGuidGenerator, RandomGuidGenerator>();
You don't have to build a container, because Depository
is a container
You can then resolve IGuidGenerator
var generator = depository.Resolve<IGuidGenerator>();
Congratulation, you successfully learned how to use it!