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
    
  
  
    
  | [DebuggerDisplay("{Nombre} ({Precio})")] | |
| internal class Producto : IComparable | |
| { | |
| public Producto(string nombre, decimal precio) | |
| { | |
| Nombre = nombre; | |
| Precio = precio; | |
| } | |
| public string Nombre { get; set; } | 
  
    
      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
    
  
  
    
  | ALTER PROCEDURE InsertarGeneroPelicula | |
| @peliculaId int, | |
| @generoId int | |
| AS | |
| BEGIN | |
| -- SET NOCOUNT ON added to prevent extra result sets from | |
| -- interfering with SELECT statements. | |
| SET NOCOUNT ON; | |
| -- Insert statements for procedure here | 
  
    
      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
    
  
  
    
  | BEGIN TRANSACTION; | |
| GO | |
| CREATE TABLE [AspNetRoles] ( | |
| [Id] nvarchar(450) NOT NULL, | |
| [Name] nvarchar(256) NULL, | |
| [NormalizedName] nvarchar(256) NULL, | |
| [ConcurrencyStamp] nvarchar(max) NULL, | |
| CONSTRAINT [PK_AspNetRoles] PRIMARY KEY ([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
    
  
  
    
  | using Microsoft.EntityFrameworkCore; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Linq; | |
| namespace ConsoleApp4 | |
| { | |
| class Program | |
| { | 
  
    
      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 class="form-control" @onchange="ChangeMessageFilter"> | |
| <option value="---" selected=@(Filter.Message == "---")>---</option> | |
| <option value="Request" selected=@(Filter.Message == "Request")>Request</option> | |
| <option value="Response" selected=@(Filter.Message == "Response")>Response</option> | |
| </select> | 
  
    
      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
    
  
  
    
  | "Key": { | |
| "Type": "Store", | |
| "StoreName": "My", | |
| "StoreLocation": "CurrentUser", | |
| "Name": "CN=SUBJECT_NAME" | |
| } | 
  
    
      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
    
  
  
    
  | "IdentityServer": { | |
| "Key": { | |
| "Type": "Development" | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | USE [master] | |
| GO | |
| /****** Object: Database [ValuesDB] Script Date: 16-Jul-20 10:45:22 PM ******/ | |
| CREATE DATABASE [ValuesDB] | |
| CONTAINMENT = NONE | |
| ON PRIMARY | |
| ( NAME = N'ValuesDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\ValuesDB.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) | |
| LOG ON | |
| ( NAME = N'ValuesDB_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\ValuesDB_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) | |
| GO | 
  
    
      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
    
  
  
    
  | peliculasQueryable = peliculasQueryable.OrderByDescending(x => x.VotosPelicula.Average(y => y.Voto)); | 
  
    
      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
    
  
  
    
  | services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>(); | |
| services.AddDbContext<ApplicationDbContext>((serviceProvider, dbContextBuilder) => | |
| { | |
| var connectionStringPlaceHolder = Configuration.GetConnectionString("PlaceHolderConnection"); | |
| var httpContextAccessor = serviceProvider.GetRequiredService<IHttpContextAccessor>(); | |
| var dbName = httpContextAccessor.HttpContext.Request.Headers["tenantId"].First(); | |
| var connectionString = connectionStringPlaceHolder.Replace("{dbName}", dbName); | |
| dbContextBuilder.UseSqlServer(connectionString); | |
| }); | 
NewerOlder