Skip to content

Instantly share code, notes, and snippets.

lordofscripts

  • Lord of Scripts LLC
  • Panama
View GitHub Profile
@lordofscripts
lordofscripts / AnyPersonModel.cs
Created Sep 14, 2017
Using Data Annotations to configure WinForm controls as per the constraint set in the model
View AnyPersonModel.cs
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace LordOfScripts.Gists.Windows.Forms.Models
{
// This is your entity model, not necessarily for Entity Framework
public class AnyPersonModel
{
@lordofscripts
lordofscripts / LayoutOptions.cs
Created May 16, 2017
How to control Layout features in ASP.NET MVC
View LayoutOptions.cs
/// <summary>
/// Application features that need rendering control at Layout level (used in ~/Shared/_Layout.cshtml
/// </summary>
public class LayoutOptions
{
/// <summary>
/// get/set whether Layout will render Google Map support features
/// </summary>
public bool HasMap { get; set; }
/// <summary>
You can’t perform that action at this time.