public void InsertData()
        {
            var teste = Teste.Factory();

            using (var provider = SqlServerDataProviderFactory.Factory())
            {
                using (var dataset = provider.GetDataSet <Teste>())
                {
                    dataset.Append(new List <Teste>()
                    {
                        teste
                    });
                }
            }
        }
        public void DeleteData()
        {
            var teste = Teste.Factory();

            using (var provider = SqlServerDataProviderFactory.Factory())
            {
                using (var dataset = provider.GetDataSet <Teste>())
                {
                    dataset.Append(new List <Teste>()
                    {
                        teste
                    });
                    var result = dataset.DeleteRecords(t => t.Id == teste.Id);

                    Assert.Equal(1, result);
                }
            }
        }
        public void CountData()
        {
            var teste = Teste.Factory();

            using (var provider = SqlServerDataProviderFactory.Factory())
            {
                using (var dataset = provider.GetDataSet <Teste>())
                {
                    dataset.Append(new List <Teste>()
                    {
                        teste
                    });

                    teste.Name = Guid.NewGuid().ToString();

                    var result = dataset.Count(t => t.Id == teste.Id);

                    Assert.Equal(1, result);
                }
            }
        }
        public void GetRecord()
        {
            var teste = Teste.Factory();

            using (var provider = SqlServerDataProviderFactory.Factory())
            {
                using (var dataset = provider.GetDataSet <Teste>())
                {
                    dataset.Append(new List <Teste>()
                    {
                        teste
                    });

                    teste.Name = "Update record";

                    var records = dataset.GetEntities(t => t.Id == teste.Id);

                    Assert.Single(records);
                }
            }
        }
        public void GetData(int limit)
        {
            var teste = Teste.Factory();

            using (var provider = SqlServerDataProviderFactory.Factory())
            {
                using (var dataset = provider.GetDataSet <Teste>())
                {
                    dataset.Append(new List <Teste>()
                    {
                        teste
                    });

                    teste.Name = "Update record";

                    var result  = dataset.UpdateRecords(t => t.Id == teste.Id, teste);
                    var records = dataset.GetEntities(e => e.Name == teste.Name, limit);

                    Assert.Equal(1, result);
                    Assert.Equal(limit, records.Count());
                }
            }
        }