zoukankan      html  css  js  c++  java
  • ABP 直接使用 dbContext

    [AbpMvcAuthorize]
        [Route("api/Test")]
        [ApiController]
        public class TestController : DiveCRMControllerBase
        {
            private readonly IDbContextProvider<DiveCRMDbContext> _provider;
     
            public TestController(IDbContextProvider<DiveCRMDbContext> provider)
            {
                _provider = provider;
            }
     
            [HttpGet]
            public string Get()
            {
                var q = _provider.GetDbContext().Customers.ToList();
                return q.ToString();
            }
        }
  • 相关阅读:
    6.24Java网络编程之IP
    Network
    Network
    Network
    Network
    ES
    JavaWeb
    ES
    ES
    ES
  • 原文地址:https://www.cnblogs.com/hanjun0612/p/13646618.html
Copyright © 2011-2022 走看看