Esempio n. 1
0
 partial void DeleteEmployer(Employer instance);
Esempio n. 2
0
 partial void InsertEmployer(Employer instance);
Esempio n. 3
0
 partial void UpdateEmployer(Employer instance);
        public bool CreateEmployer(EmployerDAO emp)
        {
            Employer employer = new Employer
            {
                Name = emp.Name,
                EmployerAddress = emp.EmployerAddress,
                PhoneNumber = emp.PhoneNumber
            };

            using (AESDatabaseDataContext db = new AESDatabaseDataContext())
            {
                db.Employers.InsertOnSubmit(employer);
                try
                {
                    db.SubmitChanges();
                }
                catch (Exception e)
                {
                    throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message));
                }
            }

            return true;
        }