Becquerel
Becquerel
CC#
Created by engineertdog on 6/26/2024 in #help
Uncaught exception
incidentally, there is no point in a catch block that only contains a throw statement (your first one)
13 replies
CC#
Created by engineertdog on 6/26/2024 in #help
Uncaught exception
is that what you mean by unhandled?
13 replies
CC#
Created by engineertdog on 6/26/2024 in #help
Uncaught exception
you are re-throwing the exception in the final catch block
13 replies
CC#
Created by op1511 on 5/18/2024 in #help
is this a bad practice
3 replies
CC#
Created by op1511 on 5/18/2024 in #help
is this a bad practice
should be fine depending on the context, i.e. if you're in a controller. you can also inject the IHttpContextAccessor through DI if you want an alternative
3 replies
CC#
Created by Mark Morton on 5/17/2024 in #help
How to control system sound output
i used naudio when i last worked with sound in c# (which was several years ago): https://github.com/naudio/NAudio
2 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
but for something more serious i would suggest you look into Testcontainers as a way to easily and safely spin up databases for testing
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
if you are just doing this as a learning exercise it's fine of course
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
because otherwise you have data from last time there when you run your test
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
because you now need to make sure the database is created at the start and dropped at the end
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
one issue with having real databases like these in your unit tests is that they inherently make your tests non-repeatable by default
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
if you already have a physical database there, then EF Core should recognise it exists when you make a DbContext
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
i believe
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
you aren't using an in memory database
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
consider using the methods context.Database.EnsureCreated() and/or context.Database.Migrate()
15 replies
CC#
Created by Cutterka on 5/16/2024 in #help
Unit testing
have you created the table in your actual sqlite instance? EF Core knowing the table exists in your model doesn't mean it exists in the physical database
15 replies
CC#
Created by RXPHXEL on 5/14/2024 in #help
Build Error
find what is using the .exe file (maybe you've got it running in another window, or another copy of visual studio open) and kill it
12 replies
CC#
Created by RXPHXEL on 5/14/2024 in #help
Build Error
something is using the .exe file, so visual studio can't move it around/delete it/rebuild it
12 replies
CC#
Created by daniswastaken on 5/10/2024 in #help
✅ Using statement still grayed out even if it in use [SOLVED]
no prob
25 replies
CC#
Created by daniswastaken on 5/10/2024 in #help
✅ Using statement still grayed out even if it in use [SOLVED]
vs code is just informing you in case it was a mistake
25 replies