Nergy101
Nergy101
CC#
Created by Zil on 7/3/2023 in #help
❔ SQL query for multiple data objects
and then do that 1 sql query
9 replies
CC#
Created by Zil on 7/3/2023 in #help
❔ SQL query for multiple data objects
it can, you'd loop over it and construct 1 SQL query string
9 replies
CC#
Created by Zil on 7/3/2023 in #help
❔ SQL query for multiple data objects
Or use some objects/classes/systems from your programming language
9 replies
CC#
Created by Zil on 7/3/2023 in #help
❔ SQL query for multiple data objects
Normally you would create a Sql query that inserts many rows at once
9 replies
CC#
Created by ghoulam on 6/13/2023 in #help
❔ ✅ Hand the connection string to a container
Look up how to use docker environment variables
5 replies
CC#
Created by ZBAGI on 5/31/2023 in #help
❔ Entity framework custom select query
Just checking here: the same query runs on the same db/connectionstring directly just fine? The error suggests it's a LINQ-TO-SQL problem... I'd suggest using Dapper-ORM in that case, through extension methods on your dbcontext like you said... Its basically like doing the raw query but has some nice features for mapping to types in a more "raw" manner (different than linq to Sql) Or use the barebones c# Sql command and Sql result classes, with those I'm quite sure you can just get back the exact same records as you'd expect
3 replies
CC#
Created by jonathanm on 5/30/2023 in #help
❔ Can't seed one-to-many relation efcore
Oh sorry, yeah, that's true!
28 replies
CC#
Created by jonathanm on 5/30/2023 in #help
❔ Can't seed one-to-many relation efcore
That's a whole other discussion I think, Focusing on getting his code to work with minimal changes atm hehe
28 replies
CC#
Created by jonathanm on 5/30/2023 in #help
❔ Can't seed one-to-many relation efcore
Well, that explains itself now doesn't it? =)
28 replies
CC#
Created by jonathanm on 5/30/2023 in #help
❔ Can't seed one-to-many relation efcore
Have you tried just using the User HasData() And nesting a single user with it's post, leaving all ID-fields null? Curious if that would work
28 replies
CC#
Created by jonathanm on 5/30/2023 in #help
❔ Can't seed one-to-many relation efcore
It's never just "a error", Its always important What error. Could you share it in full?
28 replies
CC#
Created by Florian Voß on 5/30/2023 in #help
✅ Dependency Inversion Principle, Dependency Injection
I think the marker interface is confusing you. Normally your interfaces would be pretty specific to the functionality you want to achieve E.g ICow - walk() - stop() - Moo() ICat - walk(int speed) <- different! - stop() - Meow() <- different If I wanted to program a cat I'd use the ICat and if I wanted to program a cow I'd use ICow. Now what if I want to list all animals I have interfaces for? That's what you use a "marker" interface for. I'd add
:IAnimal
:IAnimal
to ICat and the ICow interfaces. Now I could list out all animals and maybe add more generic functionality like "MakeASound" or the "stop" method since both ICat and ICow have the same Stop method signature Does this help?
6 replies
CC#
Created by Kiel on 4/12/2023 in #help
✅ Can't use `gh webhooks forward`: "Error: you must be authenticated to run this command"
Gj on finding all that out tho.
15 replies
CC#
Created by Kiel on 4/12/2023 in #help
✅ Can't use `gh webhooks forward`: "Error: you must be authenticated to run this command"
Tried to logout and back in? 😂
15 replies
CC#
Created by Kiel on 4/12/2023 in #help
✅ Can't use `gh webhooks forward`: "Error: you must be authenticated to run this command"
is there a verbose version so you can see where it's trying to Reach?
15 replies
CC#
Created by hamarb123 on 4/12/2023 in #help
❔ Send using http post with multiple parameters, to an endpoint defined in C# with minimal APIs
Ill list some options for you to google/research into: you could try using "query parameters" from the URL you could try using a HTTP body that is JSON representation of the class Test, and using a single parameter of type Test After some googling I found that .net6 and minimal-api's doesnt support [FromForm] <-- Hints to how to find the query parameters ;)
8 replies