public string Execute(string[] inputArgs) { string firstName = inputArgs[0]; string lastName = inputArgs[1]; decimal salary = decimal.Parse(inputArgs[2]); //TODO Validate var employee = new Emlpoyee { FirstName = firstName, LastName = lastName, Salary = salary }; this.context.Employees.Add(employee); this.context.SaveChanges(); var employeeDto = this.mapper.CreateMappedObject <EmployeeDto>(employee); string result = $"Registered successfully: {employeeDto.FirstName} {employeeDto.LastName} - {employeeDto.Salary}"; return(result); }
private void Child_Fetch(Emlpoyee employee) { LoadProperty(EmlpoyeeIDProperty, employee.EmlpoyeeID); LoadProperty(EmployeeStatusIDProperty, employee.EmployeeStatusID); LoadProperty(FirstNameProperty, employee.FirstName); LoadProperty(LastNameProperty, employee.LastName); LoadProperty(CompanyIDProperty, employee.CompanyID); }
internal static EmlpoyeeEdit GetEmlpoyeeEdit(Emlpoyee employee) { return(DataPortal.FetchChild <EmlpoyeeEdit>(employee)); }