예제 #1
0
    public async Task <IActionResult> OnPost()
    {
        if (!ModelState.IsValid)
        {
            return(Page());
        }

        Project = await _projectTbl.Add(Project).ConfigureAwait(false);

        return(RedirectToPage("/Project/Details", new { id = Project.Id }));
    }
예제 #2
0
        public async Task <IActionResult> OnPost()
        {
            Project = await _projectTbl.Add(Project);

            return(RedirectToPage("/Project/Details", new { id = Project.Id }));
        }
예제 #3
0
 public async Task OnGet(Guid id)
 {
     Project = (await _projectTbl.Get(x => x.Id.Equals(id), null, nameof(ProjectTbl.Templates)).ConfigureAwait(false)).Single();
 }