This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jupyter/base-notebook:latest | |
# Install .NET CLI dependencies | |
ARG NB_USER=jovyan | |
ARG NB_UID=1000 | |
ENV USER ${NB_USER} | |
ENV NB_UID ${NB_UID} | |
ENV HOME /home/${NB_USER} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jupyter/base-notebook:latest | |
# Install .NET CLI dependencies | |
ARG NB_USER=jovyan | |
ARG NB_UID=1000 | |
ENV USER ${NB_USER} | |
ENV NB_UID ${NB_UID} | |
ENV HOME /home/${NB_USER} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("/customers")] | |
public class QueryCustomers : QueryDb<Customer> {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Connect your database | |
container.AddSingleton<IDbConnectionFactory>(c => new OrmLiteConnectionFactory( | |
MapProjectPath("~/northwind.sqlite"), SqliteDialect.Provider)); | |
// Add the AutoQuery Plugin | |
Plugins.Add(new AutoQueryFeature { | |
MaxLimit = 1000 | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Connect your database | |
container.AddSingleton<IDbConnectionFactory>(c => new OrmLiteConnectionFactory( | |
MapProjectPath("~/northwind.sqlite"), SqliteDialect.Provider)); | |
// Add the AutoQuery Plugin | |
Plugins.Add(new AutoQueryFeature { | |
MaxLimit = 1000 | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Connect your database | |
container.AddSingleton<IDbConnectionFactory>(c => new OrmLiteConnectionFactory( | |
MapProjectPath("~/northwind.sqlite"), SqliteDialect.Provider)); | |
// Configure AutoQuery to Generate CRUD services | |
Plugins.Add(new AutoQueryFeature { | |
MaxLimit = 1000, | |
GenerateCrudServices = new GenerateCrudServices { | |
AutoRegister = true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("/hello/{Name}")] | |
public class Hello : IReturn<HelloResponse> | |
{ | |
public string Name { get; set; } | |
} | |
public class HelloResponse | |
{ | |
public string Result { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppHost : AppHostBase | |
{ | |
public AppHost() : base("Web",typeof(MyServices).Assembly){} | |
public override void Configure(Container container) | |
{ | |
// Add additional format support by using Plugins | |
Plugins.Add(new MsgPackFormat()); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppHost : AppHostBase | |
{ | |
public AppHost() : base("Web",typeof(MyServices).Assembly){} | |
public override void Configure(Container container) | |
{ | |
Plugins.Add(new ValidationFeature()); | |
// Register custom validator | |
container.Register<IAddressValidator>( |