存储库接口命名约定
Repository Interface naming convention
如果我声明一个带有依赖注入的控制器(存储库的接口),存储库的一般命名约定是什么?
业界普遍比较喜欢,
productrepository
_productRepository
_ProductRepository?
开始编程,努力学习
public class ProductsController : Controller
{
public ElectronicsContext _context;
public IProductRepository<Product> _ProductRepository;
使用ReSharper。它建议 ProductRepository
:
public IProductRepository<Product> ProductRepository;
如果我声明一个带有依赖注入的控制器(存储库的接口),存储库的一般命名约定是什么?
业界普遍比较喜欢,
productrepository
_productRepository
_ProductRepository?
开始编程,努力学习
public class ProductsController : Controller
{
public ElectronicsContext _context;
public IProductRepository<Product> _ProductRepository;
使用ReSharper。它建议 ProductRepository
:
public IProductRepository<Product> ProductRepository;