public void DBOperation(string command, UserProfile userProfile = null, string id = "") { switch (command) { case "Insert": client.InsertUserProfile(userProfile); break; case "Delete": client.DeleteUserProfile(new Guid(id)); break; case "Update": client.UpdateUserProfile(userProfile); break; default: break; } }