Esempio n. 1
0
        // GET: api/Vendors/5
        public VendorEntity Get(int id)
        {
            var crewEntity = crewServices.GetVendorById(id);

            if (crewEntity != null)
            {
                //Mapper.Initialize(cfg => { cfg.CreateMissingTypeMaps = true; cfg.CreateMap<VendorEntity, VendorViewModel>(); });
                //var crew = Mapper.Map<VendorEntity, VendorViewModel>(crewEntity);
                return(crewEntity);
            }
            return(null);
        }