public PersonCoffeePlaceAssociation(Person person, CoffeePlace coffeePlace) : this() { PersonId = person.Id; Person = person; CoffeePlaceId = coffeePlace.Id; CoffeePlace = coffeePlace; }
public async Task <CoffeePlace> Create(CreateCoffeePlaceCommand command) { var coffeePlace = new CoffeePlace(command); await _coffeePlaceRepository .AddAsync(coffeePlace); return(coffeePlace); }
public CoffeePlaceWithDetailsResponse(CoffeePlace coffeePlace) { CoffeePlaceId = coffeePlace.Id; Name = coffeePlace.Name; RegisteredPersons = coffeePlace .PersonCoffeePlaceAssociations .Select(s => s.Person) .Select(person => new PersonResponse(person)) .ToList(); }
public CoffeePlaceResponse(CoffeePlace coffeePlace) { CoffeePlaceId = coffeePlace.Id; Name = coffeePlace.Name; }