public async Task <int> DeleteAsync(T entity)
        {
            string statement = MssqlQueryBuilder.BuildSingleUpdateStatement <T>();
            var    result    = await ExecuteAsync(statement, entity);

            return(result);
        }
        public async Task <int> PutAsync(T entity)
        {
            string statement = MssqlQueryBuilder.BuildSinglePutStatement <T>();
            int    result    = await ExecuteAsync(statement, entity);

            return(result);
        }
        public async Task <IEnumerable <T> > FindAsync(object condition)
        {
            string statement = MssqlQueryBuilder.BuildSelectStatement <T>(condition);
            var    result    = await QueryAsync <T>(statement, condition);

            return(result);
        }
        public async Task <int> InsertAsync(T entity)
        {
            string statement = MssqlQueryBuilder.BuildInsertStatement <T>();
            var    result    = await ExecuteAsync(statement, entity);

            return(result);
        }
        public int Put(T entity)
        {
            string statement = MssqlQueryBuilder.BuildSinglePutStatement <T>();
            int    result    = Execute(statement, entity);

            return(result);
        }
        public int Update(T entity)
        {
            string statement = MssqlQueryBuilder.BuildSingleUpdateStatement <T>();
            var    result    = Execute(statement, entity);

            return(result);
        }
        public async Task <T> GetFirstAsync(object condition)
        {
            string statement = MssqlQueryBuilder.BuildSelectStatement <T>(condition);
            var    result    = await QueryAsync <T>(statement, condition);

            if (result.Any())
            {
                return(result.ElementAt(0));
            }
            return(null);
        }
        public T GetFirst(object condition)
        {
            string statement = MssqlQueryBuilder.BuildSelectStatement <T>(condition);
            var    result    = Query <T>(statement, condition);

            if (result.Any())
            {
                return(result.ElementAt(0));
            }
            return(null);
        }
 public IEnumerable <T> Find(object condition)
 {
     using (var connection = new SqlConnection(connectionString))
     {
         connection.Open();
         string statement = MssqlQueryBuilder.BuildSelectStatement <T>(condition);
         var    result    = connection.Query <T>(statement, condition);
         connection.Close();
         return(result);
     }
 }