public void Convert() { var user = new User { Id = 0, UserName = "******" }; var dic = RequestConvert.Instance.ToSqlParameters(user, true); var dic_1 = RequestConvert.Instance.ToSqlParameters(user, false); var dic_cache = RequestConvertCache <User, IgnoreCase> .Convert(user); var dic_cache_1 = RequestConvertCache <User> .Convert(user); }
private static SqlParameterCollection ToSqlParameters <TEntity>(TEntity entity, bool ignoreCase) { return(ignoreCase ? RequestConvertCache <TEntity, IgnoreCaseType> .Convert(entity) : RequestConvertCache <TEntity> .Convert(entity)); }