private void mView_Send(object sender, EventArgs e) { var dto = new DtoAuthor { AuthorId = mView.AuthorId, FirstName = mView.FirstName, LastName = mView.LastName }; if (dto.AuthorId > 0) { mView.Message = _authorDm.Update(dto); } else { mView.Message = _authorDm.Add(dto); } }
public IActionResult Create() { return(View(adm.Add())); }
public IActionResult OnGet() { Author = _authorDm.Add(); return(Page()); }