private IEnumerable <Product> GetProductData(string sql, dynamic param = null) { List <Product> product = null; //using (IDbConnection cn = Connection) using (SqlCeConnection cn = Connection2) { cn.Open(); using (var multi = cn.QueryMultiple(sql, (object)param)) { product = multi.Read <dynamic, dynamic, Product>((prd, user) => { Product prod = Map(prd); //prod.CreatedBy = new UserDataMapper().Map(user); return(prod); }, splitOn: "UserID").ToList(); } } return(product); }