Skip to content

Instantly share code, notes, and snippets.

View RemiBou's full-sized avatar

Rémi BOURGAREL RemiBou

View GitHub Profile
@RemiBou
RemiBou / gist:3690641
Created September 10, 2012 12:26
RemiDDD : Command Handler Sample
public class SelectProductCommandHandler : ICommandHandler<SellProductCommand>
{
private readonly DbContext _dbcontext;
public SelectProductCommandHandler(DbContext dbcontext)
{
_dbcontext = dbcontext;
}
public void Execute(SellProductCommand command)
@RemiBou
RemiBou / gist:3690611
Created September 10, 2012 12:17
RemiDDD sample Command
public class SellProductCommand : ICommand
{
public int ProductId { get; set; }
public int CustomerId { get; set; }
public string SellerComment { get; set; }
}
@RemiBou
RemiBou / gist:3690177
Created September 10, 2012 10:27
Instantiating TransactionScope With Ninject
/// <summary>
/// Load your modules or register your services here!
/// </summary>
/// <param name="kernel">The kernel.</param>
private static void RegisterServices(IKernel kernel)
{
kernel.Bind<MyDBContext>()
.To<MyDBContext>()
.InRequestScope()