I have a service with a function public bool UpdateSubClient(ref SubClient subClient)
which updates the database.
Subclient model is as follow
public string SubClientName { get; set; }
public string BtnText { get; set;}
public string HdrText { get; set; }
public string ReturnURL { get; set; }
I am trying to call the the UpdateSubclient as follows
SubClientService subclientservice = new SubClientService();
SubClient currentsubclient = new SubClient();
currentsubclient.SubClientName = form["SubClientName"].ToString();
currentsubclient.ClientID = Convert.ToInt32(form["ClientID"]);
currentsubclient.BtnText = form["BtnText"].ToString();
currentsubclient.HdrText = form["HdrText"].ToString();
currentsubclient.ReturnURL = form["ReturnURL"].ToString();
bool success = subclientservice.UpdateSubClient(currentsubclient);
I am getting invalid argument error and couldn't figure out the way to pass reference. Any help will be appreciated.