Пример #1
0
        public async Task <ActionResult> CreateAsync(MissionModel model, long?projectId)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View());
                }
                model.Projet = new ProjetModel {
                    Id = projectId
                };

                await _missionService.AddAsync(HttpContext.Session, model);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }