/// <summary>
 /// Deprecated Method for adding a new object to the Cases EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCases(Case @case)
 {
     base.AddObject("Cases", @case);
 }
 /// <summary>
 /// Create a new Case object.
 /// </summary>
 /// <param name="caseID">Initial value of the CaseID property.</param>
 public static Case CreateCase(global::System.Int32 caseID)
 {
     Case @case = new Case();
     @case.CaseID = caseID;
     return @case;
 }
        public int InsertNewCase()
        {
            try
            {
                using (GLBWeb_glbtsEntities ctx = new GLBWeb_glbtsEntities())
                {

                    Case newCase = new Case();
                    newCase.FirstName = "Dulcie";
                    newCase.LastName = "Ammini";
                    newCase.SourceID = 8;
                    newCase.StatusID = 35;
                    newCase.SoldCase = false;

                    /*newCase.Address = " my address";
                    newCase.TaxProblem = "Unpaid Tax";

                    newCase.CasemanagerID = 1;
                    newCase.CaseworkerID = 5;
                    newCase.SetOfficerID = 1;
                    newCase.ServiceID = 1;
                    newCase.ServiceID2 = 2;
                    newCase.ServiceID3 = 1;
                    newCase.Source = Source.CreateSource(4);
                    newCase.MiddleName = "Veluthukaran";
                    newCase.DOB = DateTime.MaxValue;
                    newCase.MartialStatus = 2;
                    newCase.HomePhone = "210-269-6098";
                    newCase.WorkPhone = "210-269-6098";
                    newCase.CellPhone = "210-269-6098";
                    newCase.Fax = "210-269-6098";
                    newCase.Email = "*****@*****.**";
                    newCase.BestTimeToCall = "5pm";
                    newCase.SMS_Perm = true;

                    newCase.BusinessName = "GLB Tax Service";
                    newCase.BusinessOwnershipType = 2;
                    newCase.EmploymentTypeID = 1;

                    //Business Address
                    newCase.BusinessAddress = "Business address";
                    newCase.BusinessCity = "business city";
                    newCase.BusinessState = "Texas";

                    //General
                    newCase.TypeOfWork = "Programmer";
                    newCase.SignatureTitle = "Developer";

                    //company information
                    newCase.CompanyStatus = 1;
                    newCase.EmployeesPayRoll = 30; */

                    ctx.Cases.AddObject(newCase);

                    ctx.SaveChanges();
                    int caseid = newCase.CaseID;
                    return caseid;

                }
            }
            catch (Exception ex)
            {

                throw;
            }
        }