using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace Sample.RabbitMQ.MySql { public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddDbContext(); services.AddCap(x => { x.UseEntityFramework(); x.UseRabbitMQ("localhost"); x.UseDashboard(); }); services.AddMvc(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(); loggerFactory.AddDebug(); app.UseMvc(); app.UseCap(); } } }