Пример #1
0
        public virtual async Task <int> UpdateAsync <T>(T entity, string schema, string[] ignoreParameters = null)
        {
            var query = $"UPDATE {schema + typeof(T).Name} SET {_dbHelper.ConstructColumsForUpdate<T>(ignoreParameters)} Where {_dbHelper.GetPrimaryKeyAutoGenerated<T>()}=@{_dbHelper.GetPrimaryKeyAutoGenerated<T>()} ;";
            var count = await _dapper.ExecuteAsync(_dbconnection, query, entity, _openTransaction);

            return(count);
        }