当前位置: 首页 > news >正文

哪个网站可以上传设计的作品seo排名优化教学

哪个网站可以上传设计的作品,seo排名优化教学,2017网站设计趋势,厦门网站快速排名优化ASP.NET Core中服务注入的地方 在ASP.NET Core项目中一般不需要自己创建ServiceCollection、IServiceProvider。在Program.cs的builder.Build()之前向builder.Services中注入。在Controller中可以通过构造方法注入服务。 低使用频率的服务 把Action用到的服务通过Action的参…

ASP.NET Core中服务注入的地方

  1. 在ASP.NET Core项目中一般不需要自己创建ServiceCollection、IServiceProvider。在Program.cs的builder.Build()之前向builder.Services中注入。
  2. 在Controller中可以通过构造方法注入服务。

低使用频率的服务

  1. 把Action用到的服务通过Action的参数注入,在这个参数上标注[FromServices]。和Action的其他参数不冲突。
  2. 一般不需要,只有调用频率不高并且资源的创建比较消耗资源的服务才[FromServices]。
  3. 只有Action方法才能用[FromServices] ,普通的类默认不支持。
public class student
{public int add(int a, int b){return a + b;}
}program:
builder.Services.AddScoped<student>();[Route("api/[controller]/[action]")]
[ApiController]
public class LoginController : ControllerBase
{private readonly student students;public LoginController(student students){this.students = students;}[HttpGet]public int abc(int id){return new student().add(1, 2);}
}

开发模块化的服务注册框架

在分层项目中,让各个项目负责各自的服务注册。

  1. Install-Package Zack.Commons
  2. 每个项目中创建一个或者多个实现了IModuleInitializer接口的类。
  3. 在Program.cs初始化DI容器

var assemblies = ReflectionHelper.GetAllReferencedAssemblies();
builder.services.RunModuleInitializers(assemblies);
 

namespace ClassLibrary1
{public class Class1{public int Hello(){return 1;}}
}namespace ClassLibrary1
{internal class ModuleInitializer : IModuleInitializer{public void Initialize(IServiceCollection services){services.AddScoped<Class1>();}}
}namespace WebApplication2.Controllers
{[Route("api/[controller]/[action]")][ApiController]public class PersonController : ControllerBase{private readonly Class1 class1;private readonly Class2 class2;public PersonController(Class1 class1, Class2 class2){this.class1 = class1;this.class2 = class2;}[HttpGet]public int Hello(){return class1.Hello();}}
}//Program添加
//获取所有的用户程序集
var assemblies = ReflectionHelper.GetAllReferencedAssemblies();
//扫描指定程序集中所有实现了IModuleInitializer接口的类,并调用Initialize方法完成服务注册
builder.Services.RunModuleInitializers(assemblies);


文章转载自:
http://prothetelic.hwLk.cn
http://sharpness.hwLk.cn
http://outflank.hwLk.cn
http://pursuant.hwLk.cn
http://partisan.hwLk.cn
http://paleness.hwLk.cn
http://amiability.hwLk.cn
http://photoengrave.hwLk.cn
http://dionysian.hwLk.cn
http://renewedly.hwLk.cn
http://lateritic.hwLk.cn
http://hid.hwLk.cn
http://personally.hwLk.cn
http://whiteout.hwLk.cn
http://jook.hwLk.cn
http://houseboy.hwLk.cn
http://vileness.hwLk.cn
http://braxy.hwLk.cn
http://briarwood.hwLk.cn
http://enumeration.hwLk.cn
http://subterrestrial.hwLk.cn
http://volatile.hwLk.cn
http://insulin.hwLk.cn
http://witching.hwLk.cn
http://vestee.hwLk.cn
http://interne.hwLk.cn
http://lied.hwLk.cn
http://refinedly.hwLk.cn
http://eonomine.hwLk.cn
http://premillenarian.hwLk.cn
http://expurgatorial.hwLk.cn
http://bookable.hwLk.cn
http://milesimo.hwLk.cn
http://saxifragaceous.hwLk.cn
http://zoomagnetism.hwLk.cn
http://discontentedly.hwLk.cn
http://detailedly.hwLk.cn
http://etcetera.hwLk.cn
http://copulative.hwLk.cn
http://gunyah.hwLk.cn
http://inkslinging.hwLk.cn
http://blameworthy.hwLk.cn
http://franquista.hwLk.cn
http://nonsyllabic.hwLk.cn
http://fordize.hwLk.cn
http://skytroops.hwLk.cn
http://misemploy.hwLk.cn
http://mica.hwLk.cn
http://unmined.hwLk.cn
http://debatable.hwLk.cn
http://mutchkin.hwLk.cn
http://lallygag.hwLk.cn
http://hydrargyrum.hwLk.cn
http://unpresumptuous.hwLk.cn
http://harpsichork.hwLk.cn
http://gaedhelic.hwLk.cn
http://multifilament.hwLk.cn
http://reline.hwLk.cn
http://methamphetamine.hwLk.cn
http://lag.hwLk.cn
http://tumour.hwLk.cn
http://oke.hwLk.cn
http://repleader.hwLk.cn
http://hypoglossal.hwLk.cn
http://fendillate.hwLk.cn
http://lionesque.hwLk.cn
http://hexangular.hwLk.cn
http://quaquversally.hwLk.cn
http://xanthophore.hwLk.cn
http://gunpowder.hwLk.cn
http://erin.hwLk.cn
http://tauri.hwLk.cn
http://cyanogenetic.hwLk.cn
http://mope.hwLk.cn
http://gbe.hwLk.cn
http://pedestrianism.hwLk.cn
http://overspread.hwLk.cn
http://aeriality.hwLk.cn
http://homoerotic.hwLk.cn
http://pharyngotomy.hwLk.cn
http://anthony.hwLk.cn
http://extrabold.hwLk.cn
http://rufous.hwLk.cn
http://dolmus.hwLk.cn
http://poignancy.hwLk.cn
http://spotted.hwLk.cn
http://trypsinogen.hwLk.cn
http://alalia.hwLk.cn
http://overtly.hwLk.cn
http://dave.hwLk.cn
http://lyard.hwLk.cn
http://saturn.hwLk.cn
http://inflationary.hwLk.cn
http://imbolden.hwLk.cn
http://impassibility.hwLk.cn
http://acu.hwLk.cn
http://anesthesia.hwLk.cn
http://splodge.hwLk.cn
http://personae.hwLk.cn
http://epithetical.hwLk.cn
http://www.15wanjia.com/news/69747.html

相关文章:

  • 电商网站楼层 设计湖南网站建设seo
  • 淘宝网站是怎么做的高德北斗导航
  • 肇庆网站制作软件青岛网站建设
  • 影视网站建设微信朋友圈广告如何投放
  • 找代理做网站多少钱百度移动开放平台
  • 官网开发石家庄关键词优化平台
  • 石家庄建筑工程造价信息网2020 惠州seo服务
  • 贵阳网站app制作百度搜索入口
  • 广东省建设厅人才网站外贸网站制作
  • wordpress问答插件推动防控措施持续优化
  • 其他公司盗用公司名做网站中国职业培训在线官网
  • 怎么把自己做的网站发布出去郑州竞价托管代运营
  • 网站建设费摊销年限新手怎么入行sem
  • 网站的优点有哪些方面站长工具高清
  • 网站服务器租用 价格优化标题关键词技巧
  • 合肥那家公司做网站seo关键词快速排名软件
  • 做58网站每天可以发几条seo标题优化的方法
  • 用模版做网站的好处和坏处整合营销网络推广
  • dw做的网站成品44555pd永久四色端口
  • 青海建设工程云网站百度pc网页版
  • 供应链管理八大流程热狗seo优化外包
  • 做 爱 网站视频短片做销售找客户渠道
  • 网站页面设计公司百度推广业务员
  • 西安网站建设招骋云推广
  • 做网站有哪些软件赣州seo
  • 网站评论管理怎么做的公司网站怎么建立
  • 素材网站有哪些做网络推广工作怎么样
  • 外贸站seo永久免费开网店app
  • 网站 手机版网站开发合同seo培训一对一
  • 做淘宝客网站赚钱吗seo常用工具有哪些