public void Execute(AuthorInsertDto request)
        {
            var author = new Author
            {
                FirstName = request.FirstName,
                LastName  = request.LastName,
            };

            _context.Authors.Add(author);
            _context.SaveChanges();
        }
Beispiel #2
0
 public IActionResult Post([FromBody] AuthorInsertDto dto,
                           [FromServices] IAuthorInsertCommand command)
 {
     try
     {
         executor.ExecuteCommand(command, dto);
         return(NoContent());
     }
     catch (Exception e)
     {
         return(NotFound());
     }
 }
 public IDictionary <string, object> AUTHOR_Insert(AuthorInsertDto input)
 {
     return(procedureHelper.GetData <dynamic>("AUTHOR_Insert", input).FirstOrDefault());
 }
Beispiel #4
0
 public IDictionary <string, object> AUTHOR_Insert([FromBody] AuthorInsertDto input)
 {
     return(AuthorAppService.AUTHOR_Insert(input));
 }