public static taskModelList tasksRrssult(String _workoutName) { //connect to db social_workout_app_dbEntities db = new social_workout_app_dbEntities(); List <String> names = db.tasks.Where(s => s.workoutName == _workoutName).Select(s => s.taskName).ToList(); db.Dispose(); taskModelList taskModel = new taskModelList { result = true, tasksList = names }; return(taskModel); }
public static taskModelList tasksRrssult(string _workoutName) { //connect to db db_appEntities db = new db_appEntities(); List <string> names = db.tasks.Where(s => s.workoutName == _workoutName).Select(s => s.taskName).ToList(); for (int i = 0; i < names.Count; i++) { names[i] = CryptHelper.Encrypt(names[i]); } db.Dispose(); taskModelList taskModel = new taskModelList { result = true, tasksList = names }; return(taskModel); }