mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
990 B
32 lines
990 B
using System;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Volo.Abp;
|
|
using Volo.Abp.Threading;
|
|
|
|
namespace Acme.BookStore.ConsoleApiClient
|
|
{
|
|
/* Before running this application, ensure that the Acme.BookStore.Web application is running.
|
|
*/
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
using (var application = AbpApplicationFactory.Create<ConsoleApiClientModule>(options =>
|
|
{
|
|
options.UseAutofac();
|
|
}))
|
|
{
|
|
application.Initialize();
|
|
|
|
using (var scope = application.ServiceProvider.CreateScope())
|
|
{
|
|
var demoService = scope.ServiceProvider.GetRequiredService<ApiClientDemoService>();
|
|
AsyncHelper.RunSync(() => demoService.RunAsync());
|
|
}
|
|
|
|
Console.WriteLine("Press ENTER to stop application...");
|
|
Console.ReadLine();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|