//------------------------------------------------------------------------------
// <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 UploadSchedule
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using System.Data.Entity.Core.Objects;
    using System.Linq;
    
    public partial class SE0085CTEntities : DbContext
    {
        public SE0085CTEntities()
            : base("name=SE0085CTEntities")
        {
        }
    
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }
    
        public virtual DbSet<AssemblyLine> AssemblyLines { get; set; }
        public virtual DbSet<OrderLine> OrderLines { get; set; }
        public virtual DbSet<OrderLinesExt> OrderLinesExts { get; set; }
        public virtual DbSet<OrderLineStat> OrderLineStats { get; set; }
        public virtual DbSet<OrdFASExt> OrdFASExts { get; set; }
        public virtual DbSet<OrdFASExtDtl> OrdFASExtDtls { get; set; }
        public virtual DbSet<OrdSection> OrdSections { get; set; }
        public virtual DbSet<SEOrder> SEOrders { get; set; }
        public virtual DbSet<SEPlant> SEPlants { get; set; }
        public virtual DbSet<FASDtlReqSect> FASDtlReqSects { get; set; }
        public virtual DbSet<FASDtlRequestInt> FASDtlRequestInts { get; set; }
    
        public virtual int sp_CloseFASOrder(string pFASAsmbLn, string pFASOrdNbr, Nullable<int> pOrdSectsNum, Nullable<int> pQtyComplete)
        {
            var pFASAsmbLnParameter = pFASAsmbLn != null ?
                new ObjectParameter("pFASAsmbLn", pFASAsmbLn) :
                new ObjectParameter("pFASAsmbLn", typeof(string));
    
            var pFASOrdNbrParameter = pFASOrdNbr != null ?
                new ObjectParameter("pFASOrdNbr", pFASOrdNbr) :
                new ObjectParameter("pFASOrdNbr", typeof(string));
    
            var pOrdSectsNumParameter = pOrdSectsNum.HasValue ?
                new ObjectParameter("pOrdSectsNum", pOrdSectsNum) :
                new ObjectParameter("pOrdSectsNum", typeof(int));
    
            var pQtyCompleteParameter = pQtyComplete.HasValue ?
                new ObjectParameter("pQtyComplete", pQtyComplete) :
                new ObjectParameter("pQtyComplete", typeof(int));
    
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_CloseFASOrder", pFASAsmbLnParameter, pFASOrdNbrParameter, pOrdSectsNumParameter, pQtyCompleteParameter);
        }
    }
}
