public Guid ExecuteScalarGuid(IDbCommand command) { if (AutoOpenClose) { Open(); } command.Connection = SqlConnection; command.CommandTimeout = CommandTimeout; Guid result = DatabaseConverter.ToGuid(command.ExecuteScalar()); if (AutoOpenClose) { Close(); } return(result); }
public Guid ExecuteDataTableGuid(IDbCommand command) { DataTable dataTable = ExecuteDataTable(command); return(!HasRows(dataTable) ? Guid.Empty : DatabaseConverter.ToGuid(dataTable.Rows[0][0])); }