コード例 #1
0
        public BrewLogStep InitializeNewBrew(SetupDto value)
        {
            var l = new BrewLog
            {
                TimeStamp = DateTime.Now,
                Name = value.Name,
                MashTemp = value.MashTemp,
                StrikeTemp = value.StrikeTemp,
                SpargeTemp = value.SpargeTemp,
                MashOutTemp = value.MashOutTemp,
                MashTimeInMinutes = value.MashTimeInMinutes,
                BoilTimeInMinutes = value.BoilTimeInMinutes,
                BatchSize = value.BatchSize,
                MashWaterAmount = value.MashWaterAmount,
                SpargeWaterAmount = value.SpargeWaterAmount
            };
            _db.Add(l);

            var firstStep = GetFirstStep(l);

            var brewStep = AddStep(l, firstStep);

            return brewStep;
        }
コード例 #2
0
ファイル: Repository.cs プロジェクト: Royih/BrewMatic.WebApp
        public BrewLogStep InitializeNewBrew(SetupDto value)
        {
            var l = new BrewLog
            {
                Initiated = DateTime.UtcNow,
                BeginMash = value.BeginMash.ToUniversalTime(),
                BatchNumber = value.BatchNumber,
                Name = value.Name,
                MashTemp = value.MashTemp,
                StrikeTemp = value.StrikeTemp,
                SpargeTemp = value.SpargeTemp,
                MashOutTemp = value.MashOutTemp,
                MashTimeInMinutes = value.MashTimeInMinutes,
                BoilTimeInMinutes = value.BoilTimeInMinutes,
                BatchSize = value.BatchSize,
                MashWaterAmount = value.MashWaterAmount,
                SpargeWaterAmount = value.SpargeWaterAmount
            };
            _db.Add(l);

            var firstStep = GetFirstStep(l);

            var brewStep = AddStep(l, firstStep);

            return brewStep;
        }