Exemplo n.º 1
0
      public ActionResult HtmlText( EditHtmlViewModel model )
      {         
          _repository.UpdateHtmlText( model );

         if (!string.IsNullOrWhiteSpace(model.ReturnUrl))
            return Redirect( model.ReturnUrl );

         return RedirectToAction("Index", "App");
      }
Exemplo n.º 2
0
      public void UpdateHtmlText( EditHtmlViewModel entity )
      {
         _logger.LogInformation( $"Updating Html Text Record Id: {entity.Id}" );

         HtmlText existingEntity =
            _context.HtmlTextSet.FirstOrDefault( t => t.Id == entity.Id );

         SimpleMapper.PropertyMap( entity, existingEntity );
         _context.SaveChanges();
      }
Exemplo n.º 3
0
 public void DeleteHtmlText( EditHtmlViewModel entity )
 {
    _logger.LogInformation( $"Deleting Html Text Record Id: {entity.Id}" );
    HtmlText existingEntity =
       _context.HtmlTextSet.FirstOrDefault( t => t.Id == entity.Id );
    if( existingEntity != null )
    {
       _context.HtmlTextSet.Remove( existingEntity );
       //_context.SaveChanges();
    }
 }