public int NextVal(string tableName, string columnName) { try { using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings[ConnectionName].ConnectionString)) { connection.Open(); return(connection.ExecuteScalar <int>(DapperSentenceGenerator <string> .NextVal(tableName, columnName))); } } catch (Exception e) { throw new Exception(String.Format("Exist method experienced a SQL exception")); } }
public DPGenericRepository(DPSentenceExtension <T> extension) { queryConstructor = new DapperSentenceGenerator <T>(extension); }
public DPGenericRepository(string connectionName) { this.ConnectionName = connectionName; queryConstructor = new DapperSentenceGenerator <T>(new EmptyDPSentenceExtension <T>()); }