Exemplo n.º 1
0
        public void should_get_multiple_results()
        {
            var results = StoredProcedure.ExecuteMany <Entity>("GetAll").ToList();

            results.Count.ShouldEqual(10);
            results.All(x => x.Name.Length > 3).ShouldEqual(true);
            results.All(x => x.Id > -1).ShouldEqual(true);
            results.First().Values.Count.ShouldEqual(2);
            ((bool)results.First().Values["hide"]).ShouldEqual(false);
            ((DateTime)results.First().Values["timestamp"]).ShouldBeGreaterThan(DateTime.MinValue);
        }
Exemplo n.º 2
0
 public static IEnumerable <TEntity> ExecuteMany <TEntity>(
     this IStoredProcedure storedProcedure,
     string name, object parameters) where TEntity : class
 {
     return(storedProcedure.ExecuteMany <TEntity>(name, parameters.AsDictionary()));
 }