Massive performance increase on SQL CE4 thanks to Jesper Hauge and Erik Ejlskov Jensen (SQL CE MVP) from Twins #h5yr Work items: 28347
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SqlCeApplicationBlock.cs" />
|
||||
<Compile Include="SqlCeContextGuardian.cs" />
|
||||
<Compile Include="SqlCEDataReader.cs" />
|
||||
<Compile Include="SqlCEHelper.cs" />
|
||||
<Compile Include="SqlCEInstaller.cs" />
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Data.SqlServerCe;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using SQLCE4Umbraco;
|
||||
|
||||
namespace SqlCE4Umbraco
|
||||
{
|
||||
@@ -29,10 +30,8 @@ namespace SqlCE4Umbraco
|
||||
|
||||
try
|
||||
{
|
||||
using (SqlCeConnection conn = new SqlCeConnection())
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
using (SqlCeCommand cmd = new SqlCeCommand(commandText, conn))
|
||||
{
|
||||
AttachParameters(cmd, commandParameters);
|
||||
@@ -68,7 +67,7 @@ namespace SqlCE4Umbraco
|
||||
try
|
||||
{
|
||||
int rowsAffected;
|
||||
using (SqlCeConnection conn = new SqlCeConnection())
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
// this is for multiple queries in the installer
|
||||
if (commandText.Trim().StartsWith("!!!"))
|
||||
@@ -76,8 +75,6 @@ namespace SqlCE4Umbraco
|
||||
commandText = commandText.Trim().Trim('!');
|
||||
string[] commands = commandText.Split('|');
|
||||
string currentCmd = String.Empty;
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
@@ -142,9 +139,8 @@ namespace SqlCE4Umbraco
|
||||
Debug.WriteLine(commandText);
|
||||
Debug.WriteLine("----------------------------------------------------------------------------");
|
||||
SqlCeDataReader reader;
|
||||
SqlCeConnection conn = new SqlCeConnection();
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString);
|
||||
|
||||
try
|
||||
{
|
||||
SqlCeCommand cmd = new SqlCeCommand(commandText, conn);
|
||||
@@ -168,7 +164,7 @@ namespace SqlCE4Umbraco
|
||||
public static bool VerifyConnection(string connectionString)
|
||||
{
|
||||
bool isConnected = false;
|
||||
using (SqlCeConnection conn = new SqlCeConnection())
|
||||
using (SqlCeConnection conn = SqlCeContextGuardian.Open(connectionString))
|
||||
{
|
||||
conn.ConnectionString = connectionString;
|
||||
conn.Open();
|
||||
|
||||
@@ -803,7 +803,7 @@ namespace umbraco.cms.businesslogic.member
|
||||
if (!String.IsNullOrEmpty(value))
|
||||
{
|
||||
string validateMemberId = value.Substring(0, value.IndexOf("+"));
|
||||
if (validateMemberId != Membership.GetUser().ProviderUserKey.ToString())
|
||||
if (Membership.GetUser() == null || validateMemberId != Membership.GetUser().ProviderUserKey.ToString())
|
||||
{
|
||||
Member.RemoveMemberFromCache(int.Parse(validateMemberId));
|
||||
value = String.Empty;
|
||||
|
||||
@@ -305,7 +305,7 @@ namespace umbraco.cms.presentation.user
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser(u.LoginName, true);
|
||||
MembershipUser user = Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].GetUser(u.LoginName, true);
|
||||
uname.Text = u.Name;
|
||||
lname.Text = (user == null) ? u.LoginName : user.UserName;
|
||||
email.Text = (user == null) ? u.Email : user.Email;
|
||||
|
||||
Reference in New Issue
Block a user