public LogicResult <ProductTypeDTO> GetById(Guid id) { try { var entity = _productTypeBusinessLogic.GetById(id); return(LogicResult <ProductTypeDTO> .Succeed(entity)); } catch (Exception exception) { return(LogicResult <ProductTypeDTO> .Failure(exception)); } }
public string Resolve(Product source, ProductView destination, string destMember, ResolutionContext context) { if (source.ProductType == null) { return(""); } if (source.ProductType == 0) { return(""); } var type = _productTypeBusinessLogic.GetById(source.ProductType); return(type.Name); }