Из предоставленной вами информации я предположил, что ваши модели примерно такие:
GamerTBL:
public int GamerTBLId { get; set; }
public string UserName { get; set; }
public virtual ICollection<GameTBL> GameTBLs { get; set; }
GameTBL:
public int GameTBLId { get; set; }
public string GameName { get; set; }
public int GamerIDFK { get; set; }
Ваш контроллер должен быть чем-токак это:
[HttpPost]
public ActionResult Create(GameTBL gametbl)
{
if (ModelState.IsValid)
{
//First you get the gamer, from GamerTBLs
var gamer = db.GamerTBLs.Where(k => k.UserName == User.Identity.Name).SingleOrDefault();
//Then you add the game to the games collection from gamers
gamer.GameTBLs.Add(gametbl);
db.SaveChanges();
}
return RedirectToAction("Index");
}
Entity Framework абстрагирует понятия внешних ключей, вам не нужно беспокоиться об id или fk, вы просто «добавляете» объекты в коллекции объектов.