//create assigned tasks
        public void createAssignedTask(string taskName, string username)
        {
            using (var db = new HealthModelsDataContext())
            {
                Task task = db.Tasks.SingleOrDefault(targetTask => targetTask.taskName.Equals(taskName));
                User user = db.Users.SingleOrDefault(targetUser => targetUser.userName.Equals(username));

                if(task!=null && user!=null)
                {
                    var assignedTask = new AssignedTask();

                    assignedTask.taskId = task.id;
                    assignedTask.userId = user.id;

                    db.AssignedTasks.InsertOnSubmit(assignedTask);
                    db.SubmitChanges();
                }

            }
        }
		private void detach_AssignedTasks(AssignedTask entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
 partial void DeleteAssignedTask(AssignedTask instance);
 partial void UpdateAssignedTask(AssignedTask instance);
 partial void InsertAssignedTask(AssignedTask instance);
		private void attach_AssignedTasks(AssignedTask entity)
		{
			this.SendPropertyChanging();
			entity.Task = this;
		}