public static async Task <ICar> CreateCar(this IDomain domain, CarId id, string newName) { var car = domain.GetCar(id); var result = await car.Do(new CreateCar(id, newName)); if (!result.IsSuccess) { throw new Exception(result.Error); } return(car); }