public JsonResult AddMerchantDetails([FromBody] RegisterContract registerContract) { Merchant merchant = new Merchant(); merchant.Name = registerContract.Name; merchant.OrganizationName = registerContract.Organization; merchant.Address = registerContract.Address; merchant.Phone = registerContract.Phone; registerContract.id = _merchantRepository.AddMerchantDetails(merchant); Employee employee = new Employee(); employee.Name = registerContract.Name; employee.Phone = registerContract.Phone; employee.Email = registerContract.Email; employee.Username = registerContract.Username; employee.Password = registerContract.Password; employee.Dateofjoining = DateTime.UtcNow; employee.MerchantId = merchant.MerchantId; employee.DesignationId = 1; _employeeRepository.AddEmployee(merchant.MerchantId, employee); return(Json(registerContract)); }