This file contains 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 System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Security.Principal; | |
using System.Text; | |
using System.Threading.Tasks; | |
using LaptopListingSystem.Web.Authentication; | |
using LaptopListingSystem.Web.Data; |
This file contains 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 static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder => { builder.AddDebug(); }); | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddDbContext<WeatherForecastContext>(options => | |
options.UseLoggerFactory(MyLoggerFactory) | |
.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")), ServiceLifetime.Transient); | |
services.AddRazorPages(); | |
services.AddServerSideBlazor(); | |
services.AddScoped<WeatherForecastService>(); |
This file contains 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
<TelerikGrid Data=@GridData | |
Height=@Height | |
Sortable=true | |
Pageable=true> | |
<GridColumns> | |
<GridColumn Field=@nameof(Product.ProductId) Sortable="false" Title="Id" /> | |
<GridColumn Field=@nameof(Product.ProductName) Title="Product Name" /> | |
<GridColumn Field=@nameof(Product.UnitPrice) Title="Unit Price"> | |
<Template> | |
@(String.Format("{0:C2}", (context as Product).UnitPrice)) |