//------------------------------------------------------------------------------
// <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 shanuAngularMVCPivotGrid
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using System.Data.Entity.Core.Objects;
    using System.Linq;
    
    public partial class ToysDBEntities : DbContext
    {
        public ToysDBEntities()
            : base("name=ToysDBEntities")
        {
        }
    
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }
    
        public virtual DbSet<ToysSalesDetail> ToysSalesDetails { get; set; }
    
        public virtual ObjectResult<USP_ToySales_Select_Result> USP_ToySales_Select(string toy_Type, string toy_Name)
        {
            var toy_TypeParameter = toy_Type != null ?
                new ObjectParameter("Toy_Type", toy_Type) :
                new ObjectParameter("Toy_Type", typeof(string));
    
            var toy_NameParameter = toy_Name != null ?
                new ObjectParameter("Toy_Name", toy_Name) :
                new ObjectParameter("Toy_Name", typeof(string));
    
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<USP_ToySales_Select_Result>("USP_ToySales_Select", toy_TypeParameter, toy_NameParameter);
        }
    }
}
