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 static MvcHtmlString PartialFor<TModel, TProperty>( | |
this HtmlHelper<TModel> helper, | |
System.Linq.Expressions.Expression<Func<TModel, TProperty>> expression, | |
string partialViewName, | |
Dictionary<string, object> additionalViewData = null | |
) | |
{ | |
// Get model value from expression | |
string name = ExpressionHelper.GetExpressionText(expression); |
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 BankingDetails | |
{ | |
public string AccountNumber { get; set; } | |
public string RoutingTransitNumber { get; set; } | |
} |
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 BankingDetails | |
{ | |
protected string EncryptedAccountNumber { get; set; } | |
protected string EncryptedRoutingTransitNumber { get; set; } | |
public string GetAccountNumber (IDecryptor decryptor) | |
{ | |
return string.IsNullOrWhitespace(EncryptedAccountNumber) ? "" : decryptor.Decrypt(EncryptedAccountNumber); | |
} | |
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
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" /> | |
<Target Name="AfterCompile" Condition="Exists('App.$(Configuration).config')"> | |
<!--Generate transformed app config in the intermediate directory--> | |
<TransformXml Source="App.config" Destination="$(IntermediateOutputPath)$(TargetFileName).config" Transform="App.$(Configuration).config" /> | |
<!--Force build process to use the transformed configuration file from now on.--> | |
<ItemGroup> | |
<AppConfigWithTargetPath Remove="App.config" /> | |
<AppConfigWithTargetPath Include="$(IntermediateOutputPath)$(TargetFileName).config"> | |
<TargetPath>$(TargetFileName).config</TargetPath> | |
</AppConfigWithTargetPath> |
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
<!-- CONFIG FILES --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- ... --> | |
<ItemGroup> | |
<Content Include="Web.config" /> | |
<None Include="Web.Base.config"> | |
<SubType>Designer</SubType> |
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
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" /> | |
<Target Name="BeforeBuild"> | |
<TransformXml Source="App.Base.config" Transform="App.Base.$(Configuration).config" Destination="App.config" /> | |
</Target> |
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 IHttpActionResult SavePhoneSystems(long waiverId, IList<PhoneSystemModel> model) | |
{ | |
var waiver = ReturnUnfinishedWaiverByIdForUser(waiverId); | |
// Save phone systems (with addresses) | |
using (var tx = TransactionScopeBuilder.New()) | |
{ | |
waiver.SetPhoneSystems(model); | |
waiver.MarkAsDataCompletelyEntered(); |
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; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace MyProject.Reporting.ExpressionResolver | |
{ | |
/// <summary> |
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.Data.Entity; | |
using System.Data.Entity.ModelConfiguration; | |
using System.Linq; | |
using System.Reflection; | |
namespace EF6x_code_first_persistence.Mappings.Core | |
{ | |
/// <summary> |
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
$(function () { | |
// on document ready... | |
if (typeof ko != "undefined" && typeof kendo != "undefined") { | |
// Extending original KO handlers to support kendo widgets...since knockout-kendo.js does not worked well in my tests... | |
var originalHandlerForValueUpdate = ko.bindingHandlers.value.update; | |
var originalHandlerForDisableUpdate = ko.bindingHandlers.disable.update; | |
var originalHandlerForEnableUpdate = ko.bindingHandlers.enable.update; | |
var originalHandlerForReadonlyUpdate = ko.bindingHandlers.readonly.update; |
OlderNewer