martes, 26 de noviembre de 2019
Compartir:
Como recordaréis, esta directiva era bastante útil para simplificar el código de las vistas y mejorar su legibilidad, pues permitía crear funciones reutilizables que mezclaban HTML y código de servidor, como en el siguiente ejemplo:
@* File: Test.cshtml *
@Multiplication(2)
@Multiplication(3)
@helper Multiplication(int x)
{
<h2>Multiplication table of @x</h2>
<ul>
@for (var i = 1; i <= 10; i++)
{
<li>@x * @i = @(x * i)</li>
}
</ul>
}
Hasta la versión 2.2, teníamos que conformarnos con apaños como los descritos en aquél post si queríamos emular lo que llevábamos tantos años utilizando con MVC 5 y anteriores. Y también entonces comentamos que había ciertas posibilidades de que en algún momento volviera a la vida, y éstas se han materializado, por fin, en ASP.NET Core 3.0.Aunque quizás más bien habría que hablar de reencarnación...
Publicado por José M. Aguilar a las 8:48 a. m.
Nadie ha comentado la entrada, ¿quieres ser el primero?
Etiquetas: aspnetcore, aspnetcoremvc, novedades
lunes, 25 de noviembre de 2019
Compartir:

Por si te lo perdiste...
- Rendimiento de nameof en C# 6
José María Aguilar - Si las shadow properties no existen como propiedades en la entidad, ¿cómo podemos inicializarlas en el seed de Entity Framework Core?
José María Aguilar
.NET Core / .NET
- Meet WebWindow, a cross-platform webview library for .NET Core
Steve Sanderson - Easy unit testing of null argument validation (C# 8 edition)
Thomas Levesque - Augmenting the .NET Core 3.0 Generic Host
Ian Bebbington - Fire and forget a Task in .NET
Gérald Barré - Using foreach with index in C#
Thomas Levesque - HttpClient Connection Pooling in .NET Core
Steve Gordon - Using async disposable and async enumerable in frameworks older than .NET Core 3.0
Filip Woj - Using proper culture with C# string interpolation
Martin Zikmund - TaskMonitor: Free Yourself From async void and MOAR
Jean-Marie Alfonsi - Recommended Asynchronous Pattern in .NET
Damir Arh - Novedades de C# 8: Pattern Matching
Jorge Turrado
martes, 19 de noviembre de 2019
Compartir:

Pues bien, esto ha cambiado a partir de la versión 3.0, en mi opinión, hacia una dirección bastante más correcta. Veamos en qué consisten estos cambios.
lunes, 18 de noviembre de 2019
Compartir:

Por si te lo perdiste...
- Software patch, literalmente
José María Aguilar - Shadow properties en Entity Framework Core
José María Aguilar
.NET Core / .NET
-
Announcing .NET Core 3.1 Preview 3
Richard Lander
-
Interfaces In C# 8.0
Mangesh Gaherwar
-
C# 8 Interfaces: Public, Private, and Protected Members
Jeremy Clark
-
Light-weight run-time composition for the .NET Core 3.0 Generic Host
Ian Bebbington
-
.NET Framework Repair Tool
Namrata Karnam
-
Use C# 8 In Any .NET Project Today
James Montemagno
-
How to Do Naive Bayes with Numeric Data Using C#
James McCaffrey
-
How YOU can make your .NET programs perceived as more responsive with Asynchronous Code in .NET Core, C# and VS Code
Chris Noring
-
CSharp: Convert a GUID to a Compressed GUID
Metadata Consulting
-
Instantiating an object without using its constructor in C#
Filip Woj
-
High-Performance Logging in .NET Core
Steve Gordon
-
What's New With C# 8.0 – Using Declaration
Suresh M
martes, 12 de noviembre de 2019
Compartir:

SetCompatibilityVersion()
que veíamos en la plantilla de proyectos ASP.NET Core MVC y Razor Pages desde la versión 2.1:public void ConfigureServices(IServiceCollection services)
{
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}
Esta llamada era incluida de serie en los nuevos proyectos ASP.NET Core desde la versión 2.1, pero en la versión 3.0 ya no aparece. Y probablemente también os llame la atención a quienes ya habéis trabajado con ASP.NET Core 2.x, así que he pensado que sería interesante comentarlo por aquí.
lunes, 11 de noviembre de 2019
Compartir:

Por si te lo perdiste...
- Ejecutar tareas en segundo plano en ASP.NET 4.x
José María Aguilar - Cómo crear un paquete NuGet y publicarlo en Nuget.org
Jorge Turrado
.NET Core / .NET
- Announcing .NET Core 3.1 Preview 2
Richard Lander - .NET Core 3 for Windows Desktop
Olia Gavrysh - Managing output in the .NET SDK projects
Cezary Piątek - Performance Profiling of .NET Core 3 applications on Linux with dotnet-trace and PerfView
Michael Shpilt - .NET Core with Jupyter Notebooks - Available today | Preview 1
Maria Naggaga - The Most Subtle C# Bugs in 2019: Null Conditional Operator with Any()
Mikael Koskinen - Struct with “main method” as an entry point
Jiří Činčura - TryParse is your friend
Adam Storr - New features of C# 8
Koolprasadd - How to Work with C# Vectors and Matrices for Machine Learning
James McCaffrey - Novedades de C# 8: IAsyncEnumerable
Jorge Turrado
martes, 5 de noviembre de 2019
Compartir:

En este post echaremos un vistazo a gRPC y su uso en la nueva versión del framework.
lunes, 4 de noviembre de 2019
Compartir:

Por si te lo perdiste...
- Invalidar el contenido cacheado por el tag helper "cache" de ASP.NET Core MVC
José María Aguilar - Lanzar el depurador desde Javascript
José María Aguilar
.NET Core / .NET
- Introducing Orleans 3.0
Reuben Bond - How to use Nullable Reference Types in .NET Standard 2.0 and .NET Framework
Gérald Barré - NET Core 3.0 : SDK, Runtime and Set up for Development
Kusnaditjung - The .NET Process class on Linux
Tom Deseyn - How to write to a file with C# in 2019
Thomas Ardal - Defer with C# 8.0
Stuart Lang - Autofac: Eager vs Lazy Construction During Registration
Ken Dale - The history of the GC configs
Maoni Stephens - Trying Out Daily Builds of Roslyn
Stuart Lang