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
// this is a way to test Generic Repo that uses EF. Notice, I'm not advocating for generic repos. | |
using FluentAssertions; | |
using Microsoft.EntityFrameworkCore; | |
public static class MyDebug | |
{ | |
public static List<string> Sql {get; set; } = new(); | |
public static void Capture(string query) | |
{ | |
if (query.Contains("Execute")) |
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
namespace efsetp; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.ChangeTracking; | |
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; | |
using Microsoft.EntityFrameworkCore.Metadata; | |
using Moq; | |
public class Customer | |
{ | |
public int CustomerId { get; set; } |
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
@page "/" | |
Tics per second: <input type="range" min="1" max="500" @bind="@CurrentValue" class="slider" id="myRange"> @CurrentValue | |
<br/><br/> | |
<div style="width:500px; height:10px; background-color: blue; position: relative;"> | |
<div class="ball" style="@position_txt"></div> | |
</div> | |
<br/><br/> | |
<span>@DateTime.Now.ToString("HH:mm:ss")</span> | |
<span>Number of renders: @nRenders.ToString("N0")</span> | |
<br/><br/> |
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
[Parameter] | |
public IEnumerable<object> DataSource {set; get; } | |
private IEnumerable<object> Cache {set; get; } = null; | |
List<MyColumn> Columns = new List<MyColumn>(); | |
public void AddColumn(MyColumn column) | |
{ | |
var seg = DataSource; | |
Cache ??= DataSource.ToList(); | |
DataSource = Cache; |