BVNetwork.NotFound.Core.Data.DataAccessBaseEx.ExecuteNonQuery C# (CSharp) Method

ExecuteNonQuery() public method

public ExecuteNonQuery ( string sqlCommand ) : bool
sqlCommand string
return bool
        public bool ExecuteNonQuery(string sqlCommand)
        {
            return base.Database.Execute<bool>(delegate
            {
                bool success = true;

                try
                {
                    IDbCommand command = this.CreateCommand(sqlCommand);
                    command.CommandType = CommandType.Text;
                    command.ExecuteNonQuery();
                }
                catch (Exception ex)
                {
                    success = false;
                    Logger.Error(string.Format("An error occureding in the ExecuteSQL method with the following sql{0}. Exception:{1}", sqlCommand, ex));

                }
                return success;

            });
        }