private static void DefineMaterialToMaterialModelMapping()
 {
     MapperObject.AddMap <Material, MaterialModel>(src =>
     {
         var res = new MaterialModel();
         res.InjectFrom(src);
         res.TenantDomain = src.DomainId;
         if (src.Applications != null)
         {
             res.Applications = src.Applications.Select(x => MapperObject.Map <Application, ApplicationModel>(x)).ToList();
         }
         if (src.Tools != null)
         {
             res.Tools = src.Tools.Select(x => MapperObject.Map <Tool, ToolModel>(x)).ToList();
         }
         if (src.Accessories != null)
         {
             res.Accessories = src.Accessories.Select(x => MapperObject.Map <Accessory, AccessoryModel>(x)).ToList();
         }
         return(res);
     });
 }