Example #1
0
        public Task UpdateAsync(EmpEmployeePkModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("EmpEmployeePkModel ArgumentNullException Insert Async");
            }

            EmpEmployeePk dto = AutoMapperGenericHelper <EmpEmployeePkModel, EmpEmployeePk> .Convert(model);



            _empEmployeePkRepository.Update(dto);

            return(Task.FromResult <object>(null));
        }
        public Task UpdateAsync(EmpIdentityModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("EmpIdentityModel ArgumentNullException Insert Async");
            }

            EmpIdentity dto = AutoMapperGenericHelper <EmpIdentityModel, EmpIdentity> .Convert(model);

            EmpEmployeePk pk1 = _empEmployeePkRepository.Get((int)model.EmployeePkId);

            dto.EmpEmployeePk = pk1;
            if (pk1 == null)
            {
                throw new ArgumentNullException("EmployeePkId ArgumentNullException Insert Async");
            }


            _empIdentityRepository.Update(dto);

            return(Task.FromResult <object>(null));
        }
        public Task <object> InsertAsync(EmpEducationModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("EmpEducationModel ArgumentNullException Insert Async");
            }

            EmpEducation dto = AutoMapperGenericHelper <EmpEducationModel, EmpEducation> .Convert(model);

            EmpEmployeePk pk1 = _empEmployeePkRepository.Get((int)model.EmployeePkId);

            dto.EmpEmployeePk = pk1;
            if (pk1 == null)
            {
                throw new ArgumentNullException("EmployeePkId ArgumentNullException Insert Async");
            }


            var id = _empEducationRepository.Insert(dto);

            return(Task.FromResult <object>(id));
        }