public static List <DBComponentNameDataModel> GetEntityDetails(DBComponentNameDataModel dataQuery, int auditId, int applicationModeId = 0) { const string sql = @"dbo.DBComponentNameSearch "; var parameters = new { AuditId = auditId , ApplicationMode = applicationModeId , DBComponentNameId = dataQuery.DBComponentNameId , ReturnAuditInfoOnDetails = BaseDataManager.ReturnAuditInfoOnDetails , Name = dataQuery.Name }; List <DBComponentNameDataModel> result; using (var dataAccess = new DataAccessBase(DataStoreKey)) { var sp = Log4Net.LogSQLInfoStart(sql, DataStoreKey, parameters); result = dataAccess.Connection.Query <DBComponentNameDataModel>(sql, parameters, commandType: CommandType.StoredProcedure).ToList(); Log4Net.LogSQLInfoStop(sp, result.Count); } return(result); }
public static void Delete(DBComponentNameDataModel data, int auditId) { const string sql = @"dbo.DBComponentNameDelete "; var parameters = new { AuditId = auditId , DBComponentNameId = data.DBComponentNameId }; using (var dataAccess = new DataAccessBase(DataStoreKey)) { var sp = Log4Net.LogSQLInfoStart(sql, DataStoreKey, parameters); dataAccess.Connection.Execute(sql, parameters, commandType: CommandType.StoredProcedure); Log4Net.LogSQLInfoStop(sp); } }