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 Requirement : BaseEntity | |
{ | |
public DateTime CreateDate { get; set; } | |
public decimal? MinPrice { get; set; } | |
public decimal? MaxPrice { get; set; } | |
public ICollection<Contact> Contacts { get; set; } | |
public Country Country { 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
public class Resolver : IValueResolver<object, object, int?>, IValueResolver<object, object, int> | |
{ | |
public int? Resolve(object source, object destination, int? destMember, ResolutionContext context) | |
{ | |
var result = SomeLogic(source); | |
return result; | |
} | |
public int Resolve(object source, object destination, int destMember, ResolutionContext context) |
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 Resolver : IValueResolver<object, object, int>, IValueResolver<object, object, int?> | |
{ | |
public int? Resolve(object source, object destination, int? destMember, ResolutionContext context) | |
{ | |
var result = SomeLogic(source); | |
return result; | |
} | |
public int Resolve(object source, object destination, int destMember, ResolutionContext context) |
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
void Main() | |
{ | |
Mapper.Initialize(cfg => | |
{ | |
cfg.CreateMissingTypeMaps = true; | |
cfg.AddProfile(new DestinationProfile()); | |
}); | |
var source = new Source(); | |
var destination = new Destination() { Flag = false }; |
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
void Main() | |
{ | |
Mapper.Initialize(cfg => | |
{ | |
cfg.CreateMissingTypeMaps = false; | |
cfg.AddProfile(new DestinationProfile()); | |
}); | |
var source = new Source(); | |
var destination = new Destination() { Flag = false }; |
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
(function () { | |
angular.module('moduleName').directive('kendoGridRowDblClick', kendoGridRowDblClick); | |
function kendoGridRowDblClick() { | |
return { | |
link: function (scope, element, attrs) { | |
scope.$on("kendoWidgetCreated", function (event, widget) { | |
if (widget !== element.getKendoGrid()) | |
return; |
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 ProductVm | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public decimal Price { get; set; } | |
public string CategoryName { 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
public class Product | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public decimal Price { get; set; } | |
public DateTime CreationDate { 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
public class AddProductCommandHandler : IRequestHandler<AddProductCommand> | |
{ | |
private readonly ProductDatabase _database; | |
private readonly IMediator _mediator; | |
public AddProductCommandHandler(ProductDatabase database, IMediator mediator) | |
{ | |
_database = database; | |
_mediator = mediator; | |
} |
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 ProductAddedEvent : INotification | |
{ | |
public ProductAddedEvent(int id, string name, int categoryId) | |
{ | |
Id = id; | |
Name = name; | |
CategoryId = categoryId; | |
} | |
public int Id { get; } |
OlderNewer