-
clone the above create repo to working directory
-
Company name : "JPY" Project name : "Zero"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.Extensions.DependencyInjection; | |
using Shouldly; | |
using Xunit; | |
namespace MsDependencyInjectionTests | |
{ | |
public class SingletonsDependingScoped | |
{ | |
[Fact] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Demo usage | |
public class HomeController : MyControllerBase | |
{ | |
private readonly IRepository<MyEntity> _myEntityRepository; | |
public HomeController(IRepository<MyEntity> myEntityRepository) | |
{ | |
_myEntityRepository = myEntityRepository; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Abp.Collections.Extensions; | |
using Abp.Dependency; | |
using Abp.Domain.Uow; | |
using Abp.EntityFramework.Repositories; | |
using Abp.MultiTenancy; | |
namespace Abp.EntityFramework |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IServiceProvider ConfigureServices(IServiceCollection services) | |
{ | |
// Configure regular ASP.NET Core services | |
services.AddMvc(); | |
// ... | |
// Send configuration to Castle Windsor | |
Container.Populate(services); | |
Container.BeginScope(); | |
return Container.Resolve<IServiceProvider>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Abp; | |
using Abp.Application.Services.Dto; | |
using Abp.Dependency; | |
using Abp.Domain.Entities.Auditing; | |
using Abp.Extensions; |