c# Error CS 7036

Eli007 1 Reputation point
2022-09-16T09:41:51.893+00:00

Hi, I got this error for this code :
#region Database Communication.
public void DataMaintenance(Employee anEmp)
{
//perform a given database operation to the dataset in meory;
**employ
eeDB.DataSetChange(anEmp);//calling method to do the insert
employees.Add(anEmp);//
}
//***Commit the changes to the database
public bool FinalizeChanges(Employee employee)
{
//***call the EmployeeDB method that will commit the changes to the database
return employeeDB.UpdateDataSource(employee);

    }  
    #endregion  

Severity Code Description Project File Line Suppression State
Error CS7036 There is no argument given that corresponds to the required formal parameter 'operation' of 'EmployeeDB.DataSetChange(Employee, DB.DBOperation)' GoodFoodSystem C:\Users\patiance\OneDrive\Desktop\INF2011\startingFile-1\GoodFoodSystem\GoodFoodSystem\GoodFoodSystem\BusinessLayer\EmployeeController.cs 41 Active

Developer technologies ASP.NET ASP.NET Core
Azure Stack Hub
Azure Stack Hub
An extension of Azure for running apps in an on-premises environment and delivering Azure services in a datacenter.
193 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-09-16T15:26:18.403+00:00

    the error is pretty clear. EmployeeDB.DataSetChange() requires two parameters, and your code passes one,

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.