Skip to content

Instantly share code, notes, and snippets.

@ShawInnes
Created February 3, 2014 14:25
Show Gist options
  • Save ShawInnes/8784730 to your computer and use it in GitHub Desktop.
Save ShawInnes/8784730 to your computer and use it in GitHub Desktop.
Base Model class for CouchBase
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebSite.Models
{
[Serializable]
public abstract class ModelBase
{
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("type")]
public string Type { get { return this.GetType().Name.ToLower(); } }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment