Esempio n. 1
0
        public void Outer_applies_are_eliminated_complex_case()
        {
            using (var context = new BugContext())
            {
                var query =
                    from c in context.As.OrderBy(c => c.Id).Take(100)
                    let rel1                       = c.B1
                                          let rel2 = c.B2
                                                     select new
                {
                    c.Id,
                    Rel1 = new
                    {
                        rel1.Id,
                        rel1.Code,
                    },
                    Rel2 = new
                    {
                        c.B2.Id,
                        c.B2.Code,
                    }
                };

                QueryTestHelpers.VerifyQuery(
                    query,
                    @"SELECT TOP (100) 
    [Extent1].[Id] AS [Id], 
    [Extent2].[Id] AS [Id1], 
    [Extent2].[Code] AS [Code]
    FROM  [dbo].[A] AS [Extent1]
    LEFT OUTER JOIN [dbo].[B] AS [Extent2] ON [Extent1].[Id] = [Extent2].[Id]
    ORDER BY [Extent1].[Id] ASC");
            }
        }
Esempio n. 2
0
        public void Outer_applies_are_eliminated_complex_case()
        {
            using (var context = new BugContext())
            {
                var query =
                    from c in context.As.OrderBy(c => c.Id).Take(100)
                    let rel1 = c.B1
                    let rel2 = c.B2
                    select new
                    {
                        c.Id,
                        Rel1 = new
                        {
                            rel1.Id,
                            rel1.Code,
                        },
                        Rel2 = new
                        {
                            c.B2.Id,
                            c.B2.Code,
                        }
                    };

                QueryTestHelpers.VerifyQuery(
                    query,
@"SELECT TOP (100) 
    [Extent1].[Id] AS [Id], 
    [Extent2].[Id] AS [Id1], 
    [Extent2].[Code] AS [Code]
    FROM  [dbo].[A] AS [Extent1]
    LEFT OUTER JOIN [dbo].[B] AS [Extent2] ON [Extent1].[Id] = [Extent2].[Id]
    ORDER BY [Extent1].[Id] ASC");
            }
        }
        //HttpClient Client;
        //string URL = "Https://localhost:5001/api/bugs";

        public BugsController(BugContext context)
        {
            _context = context;
            //Client = new HttpClient();
            //Client.BaseAddress = new Uri(URL);
            //Client.DefaultRequestHeaders.Accept.Clear();
            //Client.DefaultRequestHeaders.Accept.Add
            //    (new MediaTypeWithQualityHeaderValue("application/json"));
        }
 public void Expressions_with_extra_convert_around_lambda_param_accepted()
 {
     Assert.DoesNotThrow(
         () =>
     {
         using (var context = new BugContext())
         {
             var q = context.As.Where(new GenericService <A>().MakeExpressionWithExtraConvertExplicitly());
             q.ToString();
         }
     });
 }
 public BugCommandHandler(BugContext bugContext, IEventHandler bugEventHandler)
 {
     db           = bugContext;
     eventHandler = bugEventHandler;
 }
Esempio n. 6
0
 public UserService(BugContext bugContext) : base(bugContext)
 {
     _bugContext = bugContext;
 }
 public BugStatusesController(BugContext context)
 {
     _context = context;
 }
Esempio n. 8
0
 public PrioritiesController(BugContext context)
 {
     _context = context;
 }
 public LocationsController(BugContext context)
 {
     _context = context;
 }
Esempio n. 10
0
 public DatabaseService(BugContext context)
 {
     _context = context;
 }
 public BugsController(BugContext bugContext, ICommandHandler bugCommandHandler, IQueryHandler bugQueryHandler)
 {
     db             = bugContext;
     commandHandler = bugCommandHandler;
     queryHandler   = bugQueryHandler;
 }
 public TestersController(BugContext context)
 {
     _context = context;
 }
Esempio n. 13
0
 public ProjectAccessesController(BugContext context)
 {
     _context = context;
 }
Esempio n. 14
0
 public ProjectsController(BugContext context)
 {
     _context = context;
 }
Esempio n. 15
0
 public UsersController(BugContext context)
 {
     _context = context;
 }
Esempio n. 16
0
 public StatesController(BugContext context)
 {
     _context = context;
 }
Esempio n. 17
0
 public BugsController(BugContext context)
 {
     _context = context;
 }
Esempio n. 18
0
 public BaseService(BugContext bugContext)
 {
     _bugContext = bugContext;
 }