public EventViewModel retrieve(EventViewModel e) { dbSchoolsEntities db = new dbSchoolsEntities(); ApplicationUser user = System.Web.HttpContext.Current.GetOwinContext().GetUserManager <ApplicationUserManager>().FindById(System.Web.HttpContext.Current.User.Identity.GetUserId()); e.ProfId = db.Profesori.ToList().Find(x => x.Guid == user.Id).Id; return(e); }
public PrezentaViewModel retrieve(PrezentaViewModel e) { dbSchoolsEntities db = new dbSchoolsEntities(); ApplicationUser user = System.Web.HttpContext.Current.GetOwinContext().GetUserManager <ApplicationUserManager>().FindById(System.Web.HttpContext.Current.User.Identity.GetUserId()); e.StudentId = db.Studenti.ToList().Find(x => x.GUID == user.Id).Id; return(e); }