This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
app.Use(async (context, next) => | |
{ | |
await next.Invoke(); | |
if (context.Response.StatusCode == StatusCodes.Status401Unauthorized) | |
{ | |
var customResponse = new { Code = "401", CustomMessage = "Maybe try logging in first!" }; | |
await context.Response.WriteAsync(JsonConvert.SerializeObject(customResponse)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stored procedure returns ID | |
ALTER PROCEDURE [dbo].[InsertValue] | |
-- Add the parameters for the stored procedure here | |
@Value1 int, | |
@Value2 nvarchar(500), | |
@Id int OUTPUT | |
AS | |
BEGIN | |
-- SET NOCOUNT ON added to prevent extra result sets from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
endpoints.MapControllerRoute( | |
name: "default", | |
pattern: "{controller}/{action}/{id?}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: Microsoft.EntityFrameworkCore.Database.Command[20101] | |
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] | |
SELECT [g].[Id], [g].[Name] | |
FROM [Genres] AS [g] | |
info: Microsoft.EntityFrameworkCore.Database.Command[20101] | |
Executed DbCommand (29ms) [Parameters=[@p0='4', @p1='5', @p2='6', @p3='7', @p4='8', @p5='9', @p6='10', @p7='11', @p8='12', @p9='13', @p10='14', @p11='15', @p12='16', @p13='17', @p14='18'], CommandType='Text', CommandTimeout='30'] | |
SET NOCOUNT ON; | |
DELETE FROM [Genres] | |
WHERE [Id] = @p0; | |
SELECT @@ROWCOUNT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"adrAdresse": "1", | |
"adrMandant": "1", | |
"adrVorname": "1", | |
"adrName": "1", | |
"adrTitel": "1", | |
"adrStrasse": "1", | |
"adrPlz": "1", | |
"adrOrt": "1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select *, stuff(rango, 1, PATINDEX('%[0-9]%',Rango)-1, '') as Rango_Bonito | |
from Prueba p | |
INNER JOIN | |
( | |
Select IdCliente, | |
MAX(CAST(SUBSTRING(stuff(rango, 1, PATINDEX('%[0-9]%',Rango)-1, ''), 0, PATINDEX('%[^0-9]%', stuff(rango, 1, PATINDEX('%[0-9]%',Rango)-1, ''))) AS INT)) as algo3 | |
from Prueba | |
GROUP BY IdCliente | |
) t | |
on p.IdCliente = t.IdCliente and p.Rango like '%' + cast(t.algo3 as nvarchar) + '%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Blazor.FileReader; | |
using BlazorMovies.Client.Auth; | |
using BlazorMovies.Client.Helpers; | |
using BlazorMovies.Client.Repository; | |
using Microsoft.AspNetCore.Blazor.Hosting; | |
using Microsoft.AspNetCore.Components.Authorization; | |
using Microsoft.Extensions.DependencyInjection; | |
using System.Threading.Tasks; | |
namespace BlazorMovies.Client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet] | |
public IEnumerable<WeatherForecast> Get() | |
{ | |
var iteracion = 1; | |
_logger.LogDebug($"Debug {iteracion}"); | |
_logger.LogInformation($"Information {iteracion}"); | |
_logger.LogWarning($"Warning {iteracion}"); | |
_logger.LogError($"Error {iteracion}"); | |
_logger.LogCritical($"Critical {iteracion}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private readonly ILogger<WeatherForecastController> _logger; | |
public WeatherForecastController(ILogger<WeatherForecastController> logger) | |
{ | |
_logger = logger; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Estudiante { | |
public int Id { get; set; } | |
public string Nombre { get; set; } | |
public int Edad { get; set; } | |
public bool EstaBorrado { get; set; } | |
} |