Beispiel #1
0
        static void Main(string[] args)
        {
            using (var context = new NorthwindContext())
            {
                var user               = context.Users.FirstOrDefault();
                var userClaims         = new EFUserDal().GetClaims(user);
                var userClaimsWithLinq = new EFUserDal().GetClaimsWithLinq(user);
            }

            Console.WriteLine("Hello World!");
        }
Beispiel #2
0
        public ActionResult Details(int id)
        {
            Project      project = _projectDal.GetProject(id);
            List <Offer> offers  = _offerDal.GetOffersByProjectId(id);
            User         owner   = _userDal.GetUser(project.OwnerId);


            EFUserDal EFUserDal = new EFUserDal();

            projectDetailViewModel.Project = project;
            projectDetailViewModel.Offers  = offers;
            projectDetailViewModel.Owner   = owner;
            if (project.StateId != 1)
            {
                User worker = _userDal.GetUser((int)project.WorkerId);
                projectDetailViewModel.Worker = worker;
            }
            projectDetailViewModel.EFUserDal = EFUserDal;

            return(View(projectDetailViewModel));
        }