//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated from a template.
//
//     Manual changes to this file may cause unexpected behavior in your application.
//     Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace WebApplication1.Models
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using System.Data.Entity.Core.Objects;
    using System.Linq;
    
    public partial class AnnuaireEntities : DbContext
    {
        public AnnuaireEntities()
            : base("name=AnnuaireEntities")
        {
        }
    
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }
    
        public virtual DbSet<Personne> Personnes { get; set; }
        public virtual DbSet<Titre> Titres { get; set; }
    
        public virtual int CombienTitre(Nullable<short> nt, ObjectParameter combien, ObjectParameter nomTitre)
        {
            var ntParameter = nt.HasValue ?
                new ObjectParameter("nt", nt) :
                new ObjectParameter("nt", typeof(short));
    
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("CombienTitre", ntParameter, combien, nomTitre);
        }
    
        public virtual ObjectResult<string> QuelTitre(Nullable<short> nt)
        {
            var ntParameter = nt.HasValue ?
                new ObjectParameter("nt", nt) :
                new ObjectParameter("nt", typeof(short));
    
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<string>("QuelTitre", ntParameter);
        }
    
        public virtual ObjectResult<SelectionParTitre_Result> SelectionParTitre(Nullable<short> nt)
        {
            var ntParameter = nt.HasValue ?
                new ObjectParameter("nt", nt) :
                new ObjectParameter("nt", typeof(short));
    
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SelectionParTitre_Result>("SelectionParTitre", ntParameter);
        }
    }
}
