public string AddDalEmployee() { Task <Stream> task = Request.Content.ReadAsStreamAsync(); task.Wait(); Stream EntityStream = task.Result; BinaryFormatter bf = new BinaryFormatter(); HREntities employees = (HREntities)bf.Deserialize(EntityStream); return(provider.AddHREmployee(employees.ListOfEntities[0])); }