Commit 5568daa8 authored by yangxiaodong's avatar yangxiaodong

update sample.

parent 0a531c88
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Cap.Consistency.Consumer;
using Cap.Consistency.Kafka;
......@@ -35,4 +33,4 @@ namespace Sample.Kafka.Controllers
return Ok();
}
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
......@@ -10,8 +6,7 @@ namespace Sample.Kafka
{
public class Program
{
public static void Main(string[] args)
{
public static void Main(string[] args) {
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
......@@ -23,4 +18,4 @@ namespace Sample.Kafka
host.Run();
}
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Cap.Consistency.Infrastructure;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
......@@ -27,7 +21,6 @@ namespace Sample.Kafka
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) {
services.AddDbContext<AppDbContext>();
services.AddConsistency()
......@@ -38,7 +31,6 @@ namespace Sample.Kafka
services.AddMvc();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
......@@ -49,4 +41,4 @@ namespace Sample.Kafka
app.UseConsistency();
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment