- User Management (UserID, Password, Balance).
- Login System with 5 attempts.
- Console alerts like "Login Success".
- A main menu with 5 options:
- Withdraw
- Deposit
- Check Balance
dotnet publish -c Release -r browser-wasm --self-contained true
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 static void DetachAllEntries(this DbContext context) | |
{ | |
foreach (var entry in context.ChangeTracker.Entries().ToList()) | |
{ | |
context.Entry(entry.Entity).State = EntityState.Detached; | |
} | |
} |
git shortlog --summary --numbered --all --no-merges
public static class DevCode
{
public static string? ToJson<T>(this T? obj, bool format = false)
{
if (obj == null) return string.Empty;
string? result;
if (obj is string)
{
builder.Services.AddDbContext<DatabaseContext>(options =>
{
options.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
options.UseSqlServer(builder.Configuration.GetConnectionString("DbConnection"));
});
Microsoft SQL Server
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=sasa@123" -p 1433:1433 --name mssql2022 --hostname mssql2022 -d mcr.microsoft.com/mssql/server:2022-latest
MySQL
docker run --name=mysql-container -e MYSQL_ROOT_PASSWORD=acesa123 -d -p 3306:3306 mysql:latest
dotnet ef dbcontext scaffold "Server=.;Database=DbName;User Id=userId;Password=password;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer -o Models -c AppDbContext -t Tbl_Name -f
EF Core Installation For Command
dotnet tool install --global dotnet-ef
dotnet tool install --global dotnet-ef --version 7
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
DECLARE @command nvarchar(max) | |
SET @command = '' | |
Declare @FileName varchar(500) = 'D:\Backup\LocalDbBackup\' + '@name' +'.bak''' | |
SELECT @command = @command + 'BACKUP DATABASE ['+name+'] TO DISK = ''' + REPLACE(@FileName, '@name', name) + ';' | |
FROM sys.databases | |
where [name] not in ( 'master', 'model', 'msdb', 'tempdb'); | |
SELECT @command | |
EXECUTE sp_executesql @command |
NewerOlder