List<Attempt> attempts= new List<Attempt>();
//Create a Instance of Attempt
Attempt objAtt = new Attempt();
Guid id = new Guid();
objtAtt.Id =id;
objtAtt.Time = DateTime.Now;
objAtt.AttemptsMetaData ="test";
objAtt.Answered = true;
objAtt.Disconnected = DateTime.Now;
attempts.Add(objAtt);
Here you pass to method,
AddTask(attempts);
Your method like this,
public void AddTask(List<Attempt> attempts)
{
}