This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This script deletes: | |
* 1. Oprhan data | |
* 2. All nodes from the trash | |
* 3. All previous node versions which are not publish or not newest unpublished | |
*/ | |
DECLARE @documentNodeObjectType uniqueidentifier = N'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'; | |
DECLARE @trashPath varchar(5) = '%-20%'; | |
PRINT 'orphan data' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[PluginController("PasswordReset")] | |
public class ResetPasswordController : Umbraco.Web.Mvc.SurfaceController | |
{ | |
private MembershipProvider BackOfficeProvider | |
{ | |
get | |
{ | |
if (Membership.Providers[UmbracoConfig.For.UmbracoSettings().Providers.DefaultBackOfficeUserProvider] == null) | |
{ | |
throw new InvalidOperationException("No membership provider found with name " + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dtoItems = DataContext.Sources.Select(new Func<Source, SourceDTO>(s => { | |
var dto = new SourceDTO(); | |
s.Map(dto); | |
return dto; | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DebugTextWriter : System.IO.TextWriter | |
{ | |
public override void Write(char[] buffer, int index, int count) | |
{ | |
//output queries to "Output" window in visual studio | |
System.Diagnostics.Debug.Write(new String(buffer, index, count), "DBDebug"); | |
} | |
public override void Write(string value) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//update panel callback | |
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); | |
function EndRequestHandler(sender, args) | |
{ | |
//update panel finished updating | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Application_End(object sender, EventArgs e) | |
{ | |
var reason = System.Web.Hosting.HostingEnvironment.ShutdownReason; | |
} |
NewerOlder