public bool InsertAuction(CreateAuction createAuction) { IAuctionService aSClient = new AuctionServiceClient("BasicHttpBinding_IAuctionService"); ConvertDataModel converter = new ConvertDataModel(); bool confirmed = false; int id = aSClient.InsertAuction(converter.ConvertFromCreateAuctionToAuctionData(createAuction)); if (id != -1) { confirmed = true; } return(confirmed); }
//for test purposes for now. public void CreateAuction(AuctionModel auctionModel, UserModel userModel) { using (AuctionServiceClient proxy = new AuctionServiceClient("BasicHttpBinding_IAuctionService")) proxy.InsertAuction(AuctionUtility.ConvertAuctionModelToAuctionData(auctionModel, userModel)); }