When you are using this ActionResult, you are passing the Login Model, as in Username/Email and Password oviously. Out of these, atleast the Username/Email should be unique. So, out of these unique property, retreive the User Id from the database using the Unique property like
The context method LINQ would go like:
var userID = Context.USER.Where(user=>user.UserName == login.userName).select(user=>user.UserID);
Here I have considered, UserName as the Unique property, use the context method in the Service not in the controller.
Then Store the UserID in a session like
Session["UserID"] = userID;
var idToBeUsedForInsert = Convert.ToInt32(Session["UserID"]);
Then try parse the Session into int and Then user the ID to insert into the database.
Hope you get some idea from this, else please post back your comments regarding your queries.
Thanks
:)