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 partial class DataModel | |
{ | |
public override int SaveChanges() | |
{ | |
try | |
{ | |
return base.SaveChanges(); | |
} | |
catch (DbEntityValidationException ex) | |
{ |
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
@-moz-document domain("stackoverflow.com") { | |
/* Uncomment if removing sticky header */ | |
/*body.newheader { | |
padding-top: 0; | |
}*/ | |
.so-header { | |
background-color: #f3f3f3; | |
/* Uncomment to remove sticky header */ | |
/*position: relative;*/ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
namespace MyNamespace | |
{ | |
public class RouteConfig |
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
using System; | |
using System.Runtime.CompilerServices; | |
using System.Security.Cryptography; | |
public class PasswordUtility | |
{ | |
// Original Version Copyright: | |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. | |
// Original License: http://www.apache.org/licenses/LICENSE-2.0 |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace dotnet_aes | |
{ | |
public class OpenSslAes | |
{ |
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
using System; | |
using System.Globalization; | |
using System.Linq; | |
using System.Text; | |
using System.Web; | |
using System.Web.Mvc; | |
using Microsoft.Internal.Web.Utils; | |
using Microsoft.Web.Helpers.Resources; | |
namespace YourNamespaceHere |
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
/// <summary> | |
/// GmailSender: Class used to access a Gmail account remotely for the purpose of sending an email message | |
/// </summary> | |
public class GmailSender | |
{ | |
/// <summary> | |
/// Static method. Accepts required elements for sending a email through the Google Mail system. | |
/// </summary> | |
/// <param name="to">The target (recipient) of the email message.</param> | |
/// <param name="subject">Subject line value for the email.</param> |
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
using System; | |
using System.Collections.Specialized; | |
using System.Configuration.Provider; | |
using System.Web.Configuration; | |
using System.Web.Security; | |
namespace Custom.Providers | |
{ | |
public class CustomMembershipProvider : MembershipProvider | |
{ |
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
using System; | |
using System.Collections.Specialized; | |
using System.Configuration.Provider; | |
using System.Linq; | |
using System.Web.Configuration; | |
using System.Web.Security; | |
namespace Custom.Providers | |
{ | |
public class CustomRoleProvider : RoleProvider |