« first day (4540 days earlier)      last day (401 days later) » 

 
2 hours later…
mr5
6:32 AM
the answers are ridiculous xD
 
user image
2
 
 
2 hours later…
9:05 AM
@mr5 lol
 
 
1 hour later…
10:10 AM
@mr5 that sounds bad
 
10:29 AM
@grrigore the best one I have seen is a Request/Response pair per available operation on your api
so, for example, if you have a rest api for customers
- PutCustomerRequest -> PutCustomerResponse (on POST /customers)
- GetCustomerRequest -> GetCustomerResponse (on GET /customers/id)
- ListCustomersRequest -> ListCustomersResponse (on GET /customers)
these models represent the input/output of your api
 
 
1 hour later…
11:50 AM
yes, this looks better
but put on PUT maybe :D
 
oh yea, perhaps :D
 
thank you
but as am example if i need to lists one with more details than the other one
I'd create another one like ListCustomerDetailsResponse?
do you have a source for that (example from microsoft or somthing)? or it's just how you decided it's best for you
 
12:19 PM
[Captain Obvious] It's a fairly common convention to name the types according to the action/method they are used by
[Captain Obvious] I do the same thing
[Captain Obvious] Not that it makes any difference at all to the output, and only minimal difference if you're using the likes of OpenApi specs for client libraries
 
well i wanna do it for my own sanity
 
mr5
12:49 PM
hey folks
This is the language where Bun is written
...should it be "which Bun was written"?
This is what I hate with Windows
 
 
2 hours later…
2:59 PM
is this a grammar question? :D
 
3:10 PM
posted on March 22, 2023 by Mark Wilson-Thomas

GitHub Copilot has become a trusted AI-assisted pair programmer helping to auto-complete comments and code more productively. That’s just the beginning though! We’ve been working to evolve Copilot to move beyond code completion and provide enhanced AI assistance that you can access throughout your development lifecycle, The post GitHub Copilot chat for Visual Studio 2022 appeared first on Visu

 
3:53 PM
Hi all
 
4:22 PM
[Captain Obvious] @mr5 why hate windows
[Captain Obvious] Blame whoever created bun
 
4:33 PM
Trying to add this task to Visual Studio 2022 to run before/during build: stackoverflow.com/a/74273981/177416
Not a clue how to do that :)
Under the proj properties GUI, it has a section for Build > Events > Pre-Built Events
Do I need to save that task in a file and then call it from here?
 
Just paste it into the csproj file, maybe figure out if it goes on the first level or goes in a Property-/ItemGroup.
 
Yeah, the docs here talk about it: learn.microsoft.com/en-us/visualstudio/msbuild/…
But they have a <UsingTask> section
 
Or put a dummy call into the events in the build section, I think that will save it to a user-local files that doesn't get checked in if you want it to be local only.
 
Oh... the code in the SO article is also a <UsingTask> but it has all the code inline
Is it possible in an MSBuild task to determine if I need to read the appsettings.Development.json or appsettings.local.json?
 
No idea, but that seems quite...complicated. Are you sure you need to change the basepath depending on configuration/stage?
Doing it with sed in the pipeline might be easier at some point
 
mr5
4:43 PM
@CaptainObvious a lot of tools I want doesn't also work in Windows. I had to resort to using WSL but I have a limited storage so I uninstall it from time to time.
 
Here's the underlying problem I'm trying to solve: in a Blazor app, on localhost, I need <base href="/"> while on my server it is <base href="/someDir/anotherDir/">
 
mr5
@Alex why not just create a separate script instead of injecting it in the middle of .csproj file. There is pre and post build script you can configure in VS
why can't you copy your server directory structure
 
Maybe it doesn't need any of this if there's a way to change the Blazor Client's index.html to use the correct <base>
@mr5 I think this is the solution: just use some correct JS to set the base HREF
I've tested it and it sets to correct value but the various _framework and other static files are picked up at the wrong location on server
 
mr5
Are you modifying some auto generated files?
Maybe applying some relative path would help
 
Thanks, mr5. Just discovered: setting the base href to the server one works locally and on server. Didn't expect that. Thought we should use a "/" for localhost and then "/someDir/anotherDir/" for remote
I'm okay with Blazor but prefer good ol' MVC. I don't need the abstraction layer -- been doing web dev for 25 years
Correction: the server path doesn't work on localhost when you refresh the page; it loses the login and you have to log on again
 
mr5
5:09 PM
 
5:25 PM
I can confirm that my idea is better :D
 

« first day (4540 days earlier)      last day (401 days later) »