예제 #1
0
        public bool AddListingToDb(CreateNewListingViewModel listing)
        {
            var newItem = createModel.MappingDomainListing(listing);

            ListingHelper.AddListingById(newItem);

            return(true);
        }
예제 #2
0
        public List <dm.Listing> ListofListing(CreateNewListingViewModel listing)
        {
            var listingitem = ListingHelper.GetallListingsByListingId(listing.ListingId);

            foreach (var item in listingitem)
            {
                createModel.MappingListing(item);
            }
            return(listingitem);
        }
예제 #3
0
        public dm.Listing MappingDomainListing(CreateNewListingViewModel listing)
        {
            var listingMapper = domainConfig.CreateMapper();

            return(listingMapper.Map <CreateNewListingViewModel, dm.Listing>(listing));
        }