« first day (3945 days earlier)      last day (986 days later) » 

 
4 hours later…
6:22 AM
Hi folks. Does my question make sense? Is it possible to have more than one method (aka action method) attributed with HttpGet in a class derived from ControllerBase?
I have attempted to do so and there is a runtime error saying :
AmbiguousMatchException: The request matched multiple endpoints. Matches:

API.Controllers.WeatherForecastController.XXX (API)
API.Controllers.WeatherForecastController.YYY (API)
If you answer my question, as always please kindly ping me. Thank you!
 
6:38 AM
Good morning
@WhoSaveMeSaveEntireWorld You can have multiple HttpGet methods easily: Just give each one its own route. You controller provides a baseroute, or RoutePrefix, as annotated on your controller class. Each action method can now have it's own Route, like [HttpGet("XXX")] and [HttpGet("YYY")], so your methods are available under /controllerprefix/XXX and /controllerprefix/YYY.
For example: I just built a new feature for our application. It's mostly self contained, so it gets its own controller for the actual feature, and its own init controller which provides 1) default data for the client and 2) the description of the form in the client, so the client may build the form with as few LoC as possible. So now the init controller gets the RoutePrefix "init", and the methods get the HttpGet("data") and HttpGet("fields") routes so I can GET both /init/data and /init/fields.
 
6:56 AM
@Squirrelkiller: You are genius. Thank you very much! Now I understood. :-)
 
7:12 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
Folks, is there any method to automatically open swagger on a browser whenever I type dotnet run?
Rather than typing swagger manually on the URL bar.
Problem solved. I have to type dotnet watch run instead of dotnet run.
 
7:35 AM
Sup
I am trying to build now a small parser for the problem that I had a few days ago, because I'm simply not going through 65k lines of text manually
so for the first step, let me give you a sample text
 
[Squirrel in Training] LONG TIME NO SEE MA NUGGETMANAGER
 
LOL
Who are you xD
Are you Lee?
BTW this isn't as easy as I had expected. When I checked the file there are even more nested shits
so I need to ask my colleagues how am I supposed to split the file
 
[Squirrel in Training] Also why arenn't u in discrod?
 
7:52 AM
What discord
OOOH there's a discord now
Wait it says you're SiT?
Oh man, long time no see haha
 
its actually a bot that works properly
who knew
 
lol
Alright so
            DESCRIPTION "EventImpactCorrelation (SNMPv1)"
                CONDITION_ID "1da73f1e-6ee4-4783-b9ea-f6535a4abc0b"
                CONDITION
                        $e ".1.3.6.1.4.1.11.2.17.19.2"
                        $G 6
                        $S 1101
                        $2 "^<@.nnmiprotocol>://<@.nnmiserver>:<@.nnmiport>/nnm$" SEPARATORS " 	"
                SET
                        SERVERLOGONLY
                        NODE IP 0.0.0.0  "<nnmiserver>"
                        OBJECT "<nnmiserver>"
I have a text file that's about 65k lines following a format similar to this one
There is the following format in average
DESCRIPTION blabla
CONDITION_ID <guid>
CONDITION
    many_nested_$something_space_value
SET
    many_nested_values
so my task is to select from description until the end of the text block
the end of block can be defined either by another DESCRIPTION after the end of SET, a parent (less tabs), or end of file
I haven't touched C# in 2 years so I'm a bit out of ideas here :D
 
8:15 AM
Who have used more than one DbContext subclass in a single application? Why do you need such classes? I am wondering....
@Squirrelkiller
 
[Squirrel in Training] yes i am sit hecti
[Squirrel in Training] Also hi lunch
 
var file = File.ReadAllLines("");
var linesWithDescriotion = file.Where(line => line.StartsWith("DeSCriptIO"));
var descriptioSpell = string.Joing("Hector is Great \r\n", linesWithDiscription);
kiss 💋
 
@WhoSaveMeSaveEntireWorld For separation of concerns. e.g. Teambuilder has a TeamsDbAccess and an AccountsDbAccess.
Welcome back hector, found a job in germany yet?
 
[Squirrel in Training] Killerino, hector has joind us here
[Squirrel in Training] COME TO THE BRIGHT SIDE FINALLY
 
But I am on the bright side
See
 
8:35 AM
 
@Squirrelkiller Sorry. For the sake of emphasizing, in the production, does it make sense to have more than one DbContext subclass in a single application?
 
Yes, absolutely
 
So there will be more than one database file?
 
Our main application has only one DAL class, and it is massive (like 5k lines) because it does everything.
I don't know how many files the database has, gotta ask postgresql guys
 
8:45 AM
[Squirrel in Training] data äccess löäyer clöss?
 
So it means we can do queries from multiple databases. It looks confusing to me. :-)
 
Nah just one database
but several dbContext classes
 
[Squirrel in Training] Just one DB but each Class has only a subset of all tables i am guessing
 
*queries
the DAL class doesn't directly expose tables
 
8:47 AM
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] Sounds stoopid 2 me
cuz u need to define multiple sources at one point or a nother
 
Teambuilder example: The AccountDbAccess class provides things like "GetPlayerFromToken" to check which player is talking to me right now.
Which accesses two tables to 1) find the token in the db 2) get its assigned player 3) pull the player's name.
 
[Squirrel in Training] Sounds very inefficient with 3 db calls
 
Thank you Squirrelkiller and Squirrelkill.
 
[Squirrel in Training] Sounds like you could use views 👁
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] > Squirrelkiller and Squirrelkill.
Are you threating us? 💪
 
For multiple data sources, you could just call this multiple times:
services.AddDbContextPool<Entities>(options =>
{
options.EnableDetailedErrors();
options.UseSqlServer(connectionString ?? StandardConnectionString);
});
And use different Entities classes
 
8:54 AM
@Botler The names are difficult to distinguish.
 
[Squirrel in Training] They arn't!
[Squirrel in Training] Squirrel in Trainig and Squirrelkiller
[Squirrel in Training] az pz lemn sqz
 
@Botler That was the "human" way. Here's the actual call:
entities.LoginTokens.Include(t => t.PlayerNavigation).
					FirstAsync(t => t.Token == token))
				.PlayerNavigation
Still looks like a single call, but it touches two tables
 
[Squirrel in Training] Add a .AsNoTracking if you're only reading
[Squirrel in Training] It actually halfs the execution time.
[Squirrel in Training] And yes, it grows with numbers.
 
Ohh nice, will do!
 
Good. Thank you. Let me continue my learning at UDEMY. :-)
 
8:56 AM
[Squirrel in Training] Also u r missin gur await 😛
 
I am the son of Adolf Hitler.
 
@Botler I omitted both the await the the mapping to business model^^
@WhoSaveMeSaveEntireWorld Must be hard to constantly be called hitler and it's correct :P
Also sorry your dad was a cunt
 
@WhoSaveMeSaveEntireWorld caare you can get banned for that in the so-chat
there is an automated bot which banes after 10min-1day
 
But maybe he is? Isn't he allowed to tell us who is father is?
 
9:22 AM
[Squirrel in Training] The bot doesn't care
[Squirrel in Training] It doesn't care about context
[Hans1984] the bot doesnt care about humans in general
[Hans1984] 🤖
 
oh wow
that emoji looks soo much better here
like a transformer
 
[Squirrel in Training] yeah but so tiny taht u cant recognize it sadly :<
 
ctrl++
 
🤖🤖🤖🤖🤖🤖🤖🤖🤖🤖🤖🤖
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] mor like
while(zoom < 2_0000%) ctrl++;
 
9:40 AM
Done
 
cool so i can star my own comments this way
harharhar
 
@HéctorÁlvarez I recently did something similar
I had a multi-gigabyte xml file that I needed to import...
obviously, parsing that xml normally wouldnt be nice, so I had to stream elements a few layers deeper
which led to that
the head would be something like "DESCRIPTION \""
but you dont really have a tail
 
10:08 AM
maybe in your case, it is easier to just split the lines
public static IEnumerable<IList<T>> SplitOn<T>(this IEnumerable<T> input, Func<T, Boolean> split)
{
    var buffer = new List<T>();
    foreach (T item in input)
    {
        if (split(item))
        {
            yield return buffer.ToList(); // copy
            buffer.Clear();
        }
        buffer.Add(item);
    }

    yield return buffer;
}
then you can just do
ReadLines()
    .SplitOn(if => it.StartsWith("\t\t\tDESCRIPTION "))
    .Skip(1) // skip header
 
10:48 AM
My father has a short mustache. Who is my father?
 
Hitler obviously
 
Thank you. You must be genius!
 
obviously
 
11:12 AM
probably a pervert
 
if you do 200 <= value && value < 400 in Visual Studio and you convert it to pattern code, what does it make?
 
It doesn't offer a conversion to pattern code.
 
new icon coming up soon
and it's about time
 
Rider does, but im not sure it does it correctly
other than that, it wont let me build it anyway, because my poor .net core does not support C# 9
 
11:41 AM
[Squirrel in Training] BUt rider is ugly af so all fair
 
12:19 PM
you mean you chose an ugly af theme?
ew
 
12:53 PM
so I remember bitching all the time about music circa 2010/2011 and only now I'm starting to enjoy it
I think I'm gonna say the same thing about Billie Eillish in 10 years
 
you probably will
 
for once I would like to enjoy something while it's current :')
 
Eilish has a style you have to let sink in
 
ya I can tell....the mumbling wasn't annoyign or anything, but I was like "why do people like this?"
 
meanwhile I am once again on a Sabaton marathon
 
12:56 PM
I can't indulge in heavy metal to save my life 😔
remember when pewdiepie released an album? my gf wouldn't stop singing it
 
...isn't that a youtuber? Didn't know he made music. Is it any good or is your gf like a hardcore fan or something?
 
yes he's a youtuber 😂
pretty sure he released the album as a joke because afaik there aren't any instruments in it or anything; it's just very minimal sing-talking
and it was 2013; pretty much anyone into youtube was into pewdiepie, except for me
the songs are so minimal that one of them is literally about his dog called "jabba the hutt" and another is about how his sandwich doesn't have turkey in it like he asked
 
1:17 PM
I fell like your gf would only sing it to fuck with you then :P
 
pretty much...like she would also frequently sing Egoraptor's "big floppy p***s" song
 
 
1 hour later…
2:22 PM
[Squirrel in Training] bye looosers ♥
 
😘😘
 
2:40 PM
Any idea on how to log lognet to graylog? I tried searching for info but there isnt much.
 
 
3 hours later…
5:54 PM
i actually had to look up what graylog was
but ummm
has anyone know how to fix Visual Studio when it skips breakpoints for one of your files?
 
6:21 PM
Hi there folks. Looking to get some outside perspective on something.

In our project we rely heavily on client libraries provided to us by another team. These libraries expose various classes to help interface with their services. Among the library code are various DTO's and other data classes that get passed into their service classes to perform operations (ex: They have an `AddUser()` method which takes a `User` object as a parameter, which is provided by their library).

My question is this: historically, our team has opted to isolate any usage of the library classes to a single layer i
 

« first day (3945 days earlier)      last day (986 days later) »