public void SaveSkills(SkillViewModel datas) { datas.EmployeeId = AuthenticationLogic.CurrentUserId; var map = _mapperSkill.Map(datas); _skill.Insert(map); }
public void Register(EmployeeViewModel employee, AuthDataViewModel authData) { var newEmployee = _mapperEmployee.Map(employee); _employee.Insert(newEmployee); int id = _employee.GetAll().Select(x => x.EmployeeId).Last(); authData.Roles = "User"; authData.EmployeeId = id; CurrentUserId = id; var newAuthData = _mapperAuthData.Map(authData); _authData.Insert(newAuthData); }