public async Task <IHttpActionResult> GetPrivateSeller(string id) { PrivateSeller objct = await db.PrivateSellers.FindAsync(id); if (objct == null) { return(NotFound()); } PrivateSellerNoR newObject = new PrivateSellerNoR() { IDNumber = objct.IDNumber, // BankApproval = objct.BankApproval, // Bid = objct.Bid, // AuctionRegistration = objct.AuctionRegistration, ProofOfResedence = objct.ProofOfResedence, // Property = objct.Property, // Property = objct.Property, // RegisteredBuyer = objct.RegisteredBuyer, // Seller = objct.Seller, // RegisteredBuyer = objct.RegisteredBuyer, Signiture = objct.Signiture, UserID = objct.UserID, // = objct.ProofOfPaymentPath, // ProofOfReturnPayment = objct.ProofOfReturnPayment // AuctionRegistration = fee.AuctionRegistration }; return(Ok(newObject)); }
// GET: api/PrivateSellers public ICollection <PrivateSellerNoR> GetPrivateSellers() { List <PrivateSellerNoR> Lys = new List <PrivateSellerNoR>(); foreach (PrivateSeller objct in db.PrivateSellers.Include(p => p.Seller)) { PrivateSellerNoR newObject = new PrivateSellerNoR() { IDNumber = objct.IDNumber, // BankApproval = objct.BankApproval, // Bid = objct.Bid, // AuctionRegistration = objct.AuctionRegistration, ProofOfResedence = objct.ProofOfResedence, // Property = objct.Property, // Property = objct.Property, // RegisteredBuyer = objct.RegisteredBuyer, // Seller = objct.Seller, // RegisteredBuyer = objct.RegisteredBuyer, Signiture = objct.Signiture, UserID = objct.UserID, // = objct.ProofOfPaymentPath, // ProofOfReturnPayment = objct.ProofOfReturnPayment // AuctionRegistration = fee.AuctionRegistration }; Lys.Add(newObject); } return(Lys); }