public string ImportFromExcel() { IFormFile file = Request.Form.Files[0]; var DeveloperType = Request.Form["DeveloperType"]; List<DeveloperModel> developers = GetDevelopersFromExcel(file); foreach (var item in developers) { int developerType = int.Parse(DeveloperType.ToString() ?? "1"); item.DeveloperTypeId = developerType; } int rows = developerRepository.ExecuteSql(developers); return rows + " Developers Uploaded"; }