TheBasedTaka
TheBasedTaka
CC#
Created by TheBasedTaka on 7/14/2024 in #help
✅ warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
No description
145 replies
CC#
Created by TheBasedTaka on 6/6/2023 in #help
✅ understanding interfaces
An interface is supposed to provide extra functionality for a class. but the class has to manually implement the method specified in the interface then whats the point of having an interface if you're going to create the custom method anyway?
17 replies
CC#
Created by TheBasedTaka on 5/15/2023 in #help
❔ Entity Framework + Docker sql server on ubuntu
the error A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) the code
using Microsoft.EntityFrameworkCore;
using cPizza.Models;

namespace cPizza.Data
{
public class ApplicationDbContext : DbContext
{
public DbSet<PizzaOrder> PizzaOrders { get; set; }

public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
{

}
}
}
using Microsoft.EntityFrameworkCore;
using cPizza.Models;

namespace cPizza.Data
{
public class ApplicationDbContext : DbContext
{
public DbSet<PizzaOrder> PizzaOrders { get; set; }

public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
{

}
}
}
{
"ConnectionStrings": {
"DefaultConnection": "Server=172.17.0.2,1433;Database=PizzaDB;User Id=SA;Password=TheB@s3dPass"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
{
"ConnectionStrings": {
"DefaultConnection": "Server=172.17.0.2,1433;Database=PizzaDB;User Id=SA;Password=TheB@s3dPass"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
(docker ps) dc9a3c76a8f8 mcr.microsoft.com/mssql/server:2019-latest "/opt/mssql/bin/perm…" 18 minutes ago Up 8 minutes 0.0.0.0:1433->1433/tcp, :::1433->1433/tcp sql1 s (docker ip) "IPAddress": "172.17.0.2",
"PortBindings": {
"1433/tcp": [
{
"HostIp": "",
"HostPort": "1433"
}
]
},
"PortBindings": {
"1433/tcp": [
{
"HostIp": "",
"HostPort": "1433"
}
]
},
47 replies