Exemplo n.º 1
0
        public RecipeCreateSelectViewModel GetAll()
        {
            var ingRepo = new IngredientRepo();
            var othRepo = new OthersRepo();

            return(new RecipeCreateSelectViewModel(ingRepo.GetAll(), othRepo.GetAllMeasurements(), othRepo.GetAllBeerTypes()));
        }
Exemplo n.º 2
0
 public RecipeService()
 {
     rp  = new RecipeRepo();
     irp = new IngredientRepo();
     mrp = new MemberRepo();
     orp = new OthersRepo();
 }
Exemplo n.º 3
0
        public int CheckAndCreateMeasurement(string MeasurementName)
        {
            var othRep  = new OthersRepo();
            var drivenM = othRep.GetMeasurementByName(MeasurementName);

            if (drivenM == null)
            {
                return(othRep.AddMeasurement(MeasurementName));
            }
            return(drivenM.MeasurementTypeId);
        }
Exemplo n.º 4
0
        public int CheckAndCreateBeerType(string BeerTypeName)
        {
            var othRep   = new OthersRepo();
            var drivenBT = othRep.GetBeerTypetByName(BeerTypeName);

            if (drivenBT == null)
            {
                return(othRep.AddBeerType(BeerTypeName));
            }
            return(drivenBT.BeerTypeId);
        }
Exemplo n.º 5
0
        public List <BeerType> GetBeerTypes()
        {
            var othRep = new OthersRepo();

            return(othRep.GetAllBeerTypes());
        }