Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
beetlex-io authored Sep 18, 2021
1 parent 4b83e5f commit 0341e9b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,35 @@ public object Map(string code, string customer)
public string Name { get; set; } = "admin";
}
```
### Windows service
``` csharp
class Program
{
private static HttpServer mServer;

static void Main(string[] args)
{
mServer = new HttpServer(80);
mServer.IsWindowsServices = true;
mServer.Setting((service, option) =>
{
option.LogToConsole = true;
option.WriteLog = true;
option.LogLevel = BeetleX.EventArgs.LogType.Info;
});
mServer.RegisterComponent<Home>();
mServer.Run();
}
}
[Controller]
public class Home
{
public object Hello(string name)
{
return $"hello {name}";
}
}
```
### EntityFrameworkCore extensions
`BeetleX.FastHttpApi.EFCore.Extension `
``` csharp
Expand Down

0 comments on commit 0341e9b

Please sign in to comment.