public async Task GetCommissionEarningsTypes()
        {
            var options = TestHelper.GetDbContext("GetCommissionEarningsTypes");

            //Given
            var lkp1 = new CommissionEarningsTypeEntity {
                Id = Guid.NewGuid(), Name = "C", DisplayOrder = 0
            };
            var lkp2 = new CommissionEarningsTypeEntity {
                Id = Guid.NewGuid(), Name = "B", DisplayOrder = 1
            };
            var lkp3 = new CommissionEarningsTypeEntity {
                Id = Guid.NewGuid(), Name = "A", DisplayOrder = 2
            };

            using (var context = new DataContext(options))
            {
                //Jumbled order
                context.CommissionEarningsType.Add(lkp2);
                context.CommissionEarningsType.Add(lkp1);
                context.CommissionEarningsType.Add(lkp3);

                context.SaveChanges();
            }

            using (var context = new DataContext(options))
            {
                var service = new CommissionLookupService(context);

                //When
                var actual = await service.GetCommissionEarningsTypes();

                //Then
                Assert.Equal(3, actual.Count);

                var actual1 = actual[0];
                Assert.Equal(lkp1.Id, actual1.Id);
                Assert.Equal(lkp1.Name, actual1.Name);

                var actual2 = actual[1];
                Assert.Equal(lkp2.Id, actual2.Id);

                var actual3 = actual[2];
                Assert.Equal(lkp3.Id, actual3.Id);
            }
        }
 public static void InsertCommissionEarningsType(DbContextOptions <DataContext> options, CommissionEarningsTypeEntity entity)
 {
     using (var context = new DataContext(options))
     {
         context.CommissionEarningsType.Add(entity);
         context.SaveChanges();
     };
 }