// ------------------------------------------------------------------------------
// This is autogenerated code from the CodeFirst template.  This file will be
// automatically re-generated from the EDMX when it is saved or the .tt is run.
// You will usually want to first generate your CodeFirst classes from your model
// and then make all subsequent modifications manually.  To avoid losing your
// changes, rename and move this code file so that it will not be re-generated.
// 
//    Generated at: 9/4/2012 7:04:45 PM
//    DevForce version: 6.1.7.1
//    Template version: 2.1.4
// ------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using IbEm   = IdeaBlade.EntityModel;
using IbCore = IdeaBlade.Core;
using IbVal  = IdeaBlade.Validation;
using IbAop  = IdeaBlade.Aop;

namespace iRely.Model { 

  #region tblSMSearchSavedSearch class

  /// <summary>The auto-generated tblSMSearchSavedSearch class. </summary>
  
  
  [Table("tblSMSearchSavedSearch", Schema="dbo")]
  public partial class tblSMSearchSavedSearch : iRely.BaseModel.iRelyEntity {

    #region Data Properties

    /// <summary>Gets or sets the intSMSearchSavedSearch. </summary>
    [Key]
    [DataMember]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    [Column("intSMSearchSavedSearch")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="intSMSearchSavedSearch", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="tblSMSearchSavedSearch_intSMSearchSavedSearch")]
    public int intSMSearchSavedSearch {
      get; set;
    }

    /// <summary>Gets or sets the strDescription. </summary>
    [DataMember]
    [Column("strDescription")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strDescription", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=255, IsRequired=false, ErrorMessageResourceName="tblSMSearchSavedSearch_strDescription")]
    public string strDescription {
      get; set;
    }

    /// <summary>Gets or sets the strName. </summary>
    [DataMember]
    [Column("strName")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strName", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=50, IsRequired=true, ErrorMessageResourceName="tblSMSearchSavedSearch_strName")]
    public string strName {
      get; set;
    }

    /// <summary>Gets or sets the dtmDateSaved. </summary>
    [DataMember]
    [Column("dtmDateSaved")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="dtmDateSaved", AutoGenerateField=true)]
    public System.Nullable<System.DateTime> dtmDateSaved {
      get; set;
    }

    /// <summary>Gets or sets the intSearchID. </summary>
    [DataMember]
    //[ForeignKey("tblSMSearch")]
    [Column("intSearchID")]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="intSearchID", AutoGenerateField=false)]
    public System.Nullable<int> intSearchID {
      get; set;
    }

    /// <summary>Gets or sets the strFilter. </summary>
    [DataMember]
    [Column("strFilter")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strFilter", AutoGenerateField=true)]
    public string strFilter {
      get; set;
    }

    #endregion Data Properties

    #region Navigation properties

    /// <summary>Gets or sets the tblSMSearch. </summary>
    [DataMember]
    [InverseProperty("tblSMSearchSavedSearches")]
    [Bindable(false)]
    [Display(Name="tblSMSearch", AutoGenerateField=false)]
    public tblSMSearch tblSMSearch {
      get; set;
    }
    #endregion Navigation properties

    #region EntityPropertyNames
    public partial class EntityPropertyNames  {
      public const String intSMSearchSavedSearch = "intSMSearchSavedSearch";
      public const String strDescription = "strDescription";
      public const String strName = "strName";
      public const String dtmDateSaved = "dtmDateSaved";
      public const String intSearchID = "intSearchID";
      public const String strFilter = "strFilter";
      
      public const String tblSMSearch = "tblSMSearch";
    }
    #endregion EntityPropertyNames
  }
  #endregion tblSMSearchSavedSearch class
}
