Ejemplo n.º 1
0
        /// <summary>
        /// IAction method for handling returning an edit view
        /// </summary>
        /// <param name="id">Id for a concentration</param>
        /// <param name="read"></param>
        /// <returns>Handles read only instructions</returns>
        public IActionResult Edit(int id, bool read = false)
        {
            var concentration = _context.ReadConcentration(id);

            var vm = new EditConcentrationViewModel
            {
                ReadOnly = read,
                Id       = concentration.Id,
                Title    = concentration.Name
            };

            return(View(vm));
        }