Exemple #1
0
      public ActionResult HtmlText( EditHtmlViewModel model )
      {         
          _repository.UpdateHtmlText( model );

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

         return RedirectToAction("Index", "App");
      }
Exemple #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();
      }
Exemple #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();
    }
 }