Esempio n. 1
0
        public string CreateBeer(string name, double abv, double baScore, string styleId, string breweryId)
        {
            var id = string.Empty;

            id = _beerRepository.NextIdentity();
            var beer = new Beer(id, name)
            {
                ABV = abv,
                BAScore = baScore,
                BreweryId = breweryId,
                RPScore = 0,
                StyleId = styleId
            };
            _beerRepository.Add(beer);

            return id;
        }
Esempio n. 2
0
 public void Save(Beer beer)
 {
     _beerRepository.Update(beer);
 }