This file contains 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 SelectProductCommandHandler : ICommandHandler<SellProductCommand> | |
{ | |
private readonly DbContext _dbcontext; | |
public SelectProductCommandHandler(DbContext dbcontext) | |
{ | |
_dbcontext = dbcontext; | |
} | |
public void Execute(SellProductCommand command) |
This file contains 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 SellProductCommand : ICommand | |
{ | |
public int ProductId { get; set; } | |
public int CustomerId { get; set; } | |
public string SellerComment { get; set; } | |
} |
This file contains 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
/// <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() |
NewerOlder