Click here to Skip to main content
15,915,703 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: That weather app... Pin
David O'Neil22-Aug-19 5:47
professionalDavid O'Neil22-Aug-19 5:47 
GeneralRe: That weather app... Pin
ZurdoDev22-Aug-19 5:54
professionalZurdoDev22-Aug-19 5:54 
GeneralRe: That weather app... Pin
dandy7222-Aug-19 5:59
dandy7222-Aug-19 5:59 
GeneralRe: That weather app... Pin
ZurdoDev22-Aug-19 6:14
professionalZurdoDev22-Aug-19 6:14 
GeneralRe: That weather app... Pin
GuyThiebaut22-Aug-19 6:21
professionalGuyThiebaut22-Aug-19 6:21 
GeneralRe: That weather app... Pin
Mark_Wallace23-Aug-19 8:04
Mark_Wallace23-Aug-19 8:04 
GeneralRe: That weather app... Pin
dandy7224-Aug-19 4:07
dandy7224-Aug-19 4:07 
RantASP.NET / EF Core Rant Pin
Marc Clifton22-Aug-19 4:04
mvaMarc Clifton22-Aug-19 4:04 
WTF?

I wrote a simple test in the Startup because I was to lazy to write a unit test. Part of writing the test is that I added the first non-generic constructor in the DB context definition:
public CatalogContext(DbContextOptions options) : base(options)
{
}

public CatalogContext(DbContextOptions<CatalogContext> options) : base(options)
{
}

Did my test, figured out how to work around the stupid EF issue, then removed my test code. And discovered that all my endpoints return "Unauthorized." WTF? Comment out that first non-generic constructor and lo-and-behold, API's work again.

WTF??? I set a breakpoint on the constructor and it doesn't even get called?

And then there's the whole IServiceCollection debacle. Whowever wrote a a service manager where you can't get the service? So you write:
services.AddDbContext...

and you'd think there might be a
services.GetDbContext...
call, right? Nope! Because they rely 100% on dependency injection. Oh for F*** sake.

And then there's db.YourContextObject.FromSql, because there isn't any SqlQuery because of Linq compatability issues. And FromSql has such absurd constraints that it basically is useless.

Read more:

Database.SqlQuery<TElement> Missing · Issue #10365 · aspnet/EntityFrameworkCore · GitHub[^]

and:

Leveraging Raw SQL in Entity Framework Core -- Visual Studio Magazine[^]

So instead I found GitHub - devel0/netcore-ef-util: net core entity framework util[^]

I despise:

* dependency injection
* EF
* Behind the scenes magic is breaks everything if you don't wave the wand just exactly right

While I like .NET Core, I just refuse to use the ASP.NET/EF pieces.

And don't even get me started on the BS on how to get CORS working properly and the whole pipeline-middlewear crapola. More perfect wand waving and incantations required.

GeneralRe: ASP.NET / EF Core Rant Pin
  Forogar  22-Aug-19 4:10
professional  Forogar  22-Aug-19 4:10 
GeneralRe: ASP.NET / EF Core Rant Pin
F-ES Sitecore22-Aug-19 4:29
professionalF-ES Sitecore22-Aug-19 4:29 
GeneralRe: ASP.NET / EF Core Rant Pin
RickZeeland22-Aug-19 6:41
mveRickZeeland22-Aug-19 6:41 
GeneralRe: ASP.NET / EF Core Rant Pin
Marc Clifton22-Aug-19 8:14
mvaMarc Clifton22-Aug-19 8:14 
GeneralRe: ASP.NET / EF Core Rant Pin
F-ES Sitecore22-Aug-19 21:57
professionalF-ES Sitecore22-Aug-19 21:57 
GeneralRe: ASP.NET / EF Core Rant Pin
Marc Clifton23-Aug-19 2:27
mvaMarc Clifton23-Aug-19 2:27 
GeneralRe: ASP.NET / EF Core Rant Pin
F-ES Sitecore23-Aug-19 2:38
professionalF-ES Sitecore23-Aug-19 2:38 
GeneralRe: ASP.NET / EF Core Rant Pin
Marc Clifton23-Aug-19 2:45
mvaMarc Clifton23-Aug-19 2:45 
GeneralRe: ASP.NET / EF Core Rant Pin
Marc Clifton23-Aug-19 2:50
mvaMarc Clifton23-Aug-19 2:50 
Generalif you could time-travel ? Pin
BillWoodruff22-Aug-19 3:32
professionalBillWoodruff22-Aug-19 3:32 
GeneralRe: if you could time-travel ? Pin
musefan22-Aug-19 3:38
musefan22-Aug-19 3:38 
GeneralRe: if you could time-travel ? Pin
Nick Ruppert23-Aug-19 6:15
Nick Ruppert23-Aug-19 6:15 
GeneralRe: if you could time-travel ? PinPopular
OriginalGriff22-Aug-19 3:38
mveOriginalGriff22-Aug-19 3:38 
GeneralRe: if you could time-travel ? Pin
Slow Eddie23-Aug-19 2:15
professionalSlow Eddie23-Aug-19 2:15 
GeneralRe: if you could time-travel ? Pin
OriginalGriff23-Aug-19 2:23
mveOriginalGriff23-Aug-19 2:23 
GeneralRe: if you could time-travel ? Pin
Slow Eddie23-Aug-19 2:33
professionalSlow Eddie23-Aug-19 2:33 
GeneralRe: if you could time-travel ? PinPopular
User 483504722-Aug-19 3:40
User 483504722-Aug-19 3:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.