/****** Object: StoredProcedure [dbo].[GetCommonGroupByRegion] Script Date: 03/23/2017 17:31:18 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER proc [dbo].[GetCommonGroupByRegion] )=null,---车型 @CreateTimeStart datetime=null, --入会开始时间 @…
一.SQL语句进行多条件查询,并解决参数为空的情况 QueryEntity query; var whereSql = new StringBuilder("Where 1=1"); IList<DbParameter> parameters = new List<DbParameter>(); if (!string.IsNullOrEmpty(query.XXX)) { whereSql.Append(" And XXX=@XXX");…