Ejemplo n.º 1
0
        //public EnhancementRequestOutcome EnhancementReqquestOutcome()
        //{

        //    IEnhancementRequestOutcomeRepository enhancementRequestOutcomeRepo = new EnhancementRequestOutcomeRepository(db);

        //}
        public EnhancementRequest CreateNewEnhancementRequest()
        {
            var enhancement = new EnhancementRequest();

            IEnhancementRequestRepository enhancementRepo = new EnhancementRequestRepository(db);
            var enhancementRequest = new EnhancementRequest {
                CustomerId = 2, Description = "Add email capabilities", Weight = 3, OutcomeId = 2
            };

            enhancementRepo.Add(enhancementRequest);
            return(enhancementRequest);
        }
Ejemplo n.º 2
0
        static void Method2()
        {
            var db = new HRMSDBContext();

            IEnhancementRequestRepository repoEnhancementRequest =
                new EnhancementRequestRepository(db);

            var specification = new Specification <EnhancementRequest>(e => e.Id == 1);

            specification.FetchStrategy.Include(e => e.Customer)
            .Include(e => e.Customer)
            .Include(e => e.Description)
            .Include(e => e.EnhanceRequestOutcome);
            var EnhancementRequest = repoEnhancementRequest.Find(specification);

            EnhancementRequest E1;

            if (repoEnhancementRequest.TryFind <EnhancementRequest>(specification, e => e, out E1))
            {
            }
        }