protected override async Task Apply(TradingChannelServiceModel source, TradingChannel target)
 {
     if (source == null)
     {
         return;
     }
     // Do Additional saving things here
 }
예제 #2
0
 public async Task <IActionResult> SaveTradingChannel([FromBody] TradingChannelServiceModel model)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     return(Ok(await Mediator.Send(new SaveTradingChannelRequest()
     {
         ServiceModel = model
     })));
 }
        public override void MapMore(TradingChannel source, TradingChannelServiceModel target)
        {
            target.Uri = $"http://localhost:5000/api/{_userContext.GetCompanyId()}/AS2";

            // Additional Mappings ...
        }
예제 #4
0
 public static TradingChannelServiceModel MapTradingChannel(this IMapperService mapper, TradingChannel model, TradingChannelServiceModel serviceModel = null)
 {
     serviceModel = serviceModel ?? new TradingChannelServiceModel();
     mapper.MapTo <TradingChannel, TradingChannelServiceModel>(model, serviceModel);
     return(serviceModel);
 }