public bool AddListingToDb(CreateNewListingViewModel listing) { var newItem = createModel.MappingDomainListing(listing); ListingHelper.AddListingById(newItem); return(true); }
public List <dm.Listing> ListofListing(CreateNewListingViewModel listing) { var listingitem = ListingHelper.GetallListingsByListingId(listing.ListingId); foreach (var item in listingitem) { createModel.MappingListing(item); } return(listingitem); }
public dm.Listing MappingDomainListing(CreateNewListingViewModel listing) { var listingMapper = domainConfig.CreateMapper(); return(listingMapper.Map <CreateNewListingViewModel, dm.Listing>(listing)); }