TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
64
2.8k
Many to Many Table Controller Create
Apr 25 2021 11:16 AM
I have a project for school to make an auction website.
I made it in ASP.NET MVC database first (with edmx things)
So i have in my project 3 tables + some others:
Auctions
Users
Users_Offers with : IdUsersOffers, AmountBid, DateBid, IdUser, IdAuction
That's the auction Page .
How can i write the controller for User_Offers to add bid for the current auction but to have DateBid = Datetime.Now; , IdAuction = current auction ; IdUser = User.identity.getuserid() when i pressed the "Bid Now", and only to write the amount that i want to bid in the input shown there?
I don't mind if when I press the "Bid Now" to redirect me to another page like this:
But i want the informations from the previous page (IdAuction) to be saved
I tried to make it automatically with entity framework but the result was giving me a list with all auctions and all users and I want only the current auction and current user authenticated.
Reply
Answers (
5
)
windows form dialog popup
User registered data only display.