Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lun3322/LunaFramework

Repository files navigation

LunaFramework Build Status

状态
Luna Luna
Luna.Web Luna.Web
Luna.Dapper Luna
Luna.MongoDb Luna
Luna.Redis.AspNetCore Luna
Luna.Nlog.AspNetCore Luna

关于使用

  1. 在Main方法中新增代码
    LunaStarter.StartUp<LunaModule>()
    
  2. service写法
    public interface IDemoService
    {
    	string GetMessage();
    }
    public class DemoService :IDemoService, ILunaService
    {
    	public string GetMessage()
    	{
    		Logger.Info("GetMessage");
    		return "测试";
    	}
    }
    
    注意接口实现ILunaService才能被自动注册进IOC

关于web包使用

修改Startup代码

public void ConfigureServices(IServiceCollection services)
{
 ...
 services.AddLuna<SampleWebModule>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
	...
	// 在UseMvc之前调用
	app.UseLuna();
	...
}

项目约定: 你的程序命名必须遵循aaa.bb.c的方式

 Demo.App <- 应用程序入口
 Demo.Service <- 服务层
 Demo.Entity <- 实体层

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /