public async Task <ServiceResponse <string> > CustomerOperation(CustomerModel Model) { var objSR = new ServiceResponse <string>(); CustomerModel CM = new CustomerModel(); try { int result = bal.CustomerOperation(Model); if (result > 0) { objSR.StatusCode = 1; objSR.Messages.Add(Model.FirstName + " is succesfully saved as Customer."); } else { objSR.StatusCode = 2; objSR.Messages.Add("There is some issue while saving the Customer."); } } catch (Exception ex) { objSR.StatusCode = 2; objSR.Messages.Add("Error occurred while login, " + ex.Message); } return(await Task.Run(() => objSR)); }