none
Adding element to DatabaseEntites table RRS feed

  • Question

  • hi everyone,

    i''m developping a windows store app using visual studio 2013. i'm trying to connect my database (using sql server 2012) to my app using web service (WCF).

    i'm tryning to ad new element to my database using this code:

    public bool InsertEmployee(Employee EmpInsert)
            {
                EmpDatabaseEntities EmpData = new EmpDatabaseEntities();
                EmployeeTablee NewEmp = new EmployeeTablee();
                NewEmp.Id = EmpInsert.EmpId;
                NewEmp.Name = EmpInsert.EmpName;
                NewEmp.Adress = EmpInsert.EmpAddress;

                EmpData.EmployeeTables.Add(NewEmp);
                EmpData.SaveChanges();
                return true;
            }

    but it give me an error: EmpDatabaseEntites  does not contain a definition for EmployeeTables 

    can anybody help me??

    thanks for advance

    Monday, March 24, 2014 11:02 AM

Answers