public async Task <ActionResult> NewFlow(NewFlowModel model)
        {
            if (!ModelState.IsValid)
            {
                return(RedirectToAction("Flows"));
            }

            var lContext = new IRRContext();

            var lflow = new Flow {
                Date       = model.Date,
                Allocation = model.Allocation,
                Direction  = model.Direction,
                Type       = model.Type,
                Value      = model.Value
            };

            await lContext.Flows.InsertOneAsync(lflow);

            return(RedirectToAction("Flows"));
        }
        public async Task<ActionResult> NewFlow(NewFlowModel model)
        {
            if (!ModelState.IsValid)
            {
                return RedirectToAction("Flows");
            }

            var lContext = new IRRContext();
            
            var lflow = new Flow {
                Date = model.Date,
                Allocation = model.Allocation,
                Direction = model.Direction,
                Type = model.Type,
                Value = model.Value
            };
        
            await lContext.Flows.InsertOneAsync(lflow);

            return RedirectToAction("Flows");
        }