Connect Your .NET MAUI Application to a Database

  Рет қаралды 3,230

SingletonSean

SingletonSean

Күн бұрын

Пікірлер: 16
@PabloGallegos
@PabloGallegos 2 ай бұрын
I'll take it for WPF, thank you very much. Give me your opinion on using MariaDB in LAN applications. Can you give an example of these databases?
@Jeremygrmn
@Jeremygrmn 6 ай бұрын
Sqlite as a file format has always been an interesting idea for me
@herczegzoltan92
@herczegzoltan92 3 ай бұрын
Is it really necessary to have Dto and Model when they are exactly the same?
@SingletonSean
@SingletonSean 3 ай бұрын
For a simple domain, it's probably fine to use the same object!
@gregorymoore2877
@gregorymoore2877 5 күн бұрын
It's not necessary to have a model and a dto. I would just use the model. If your model has properties that will not map to a table column, you can use the [Ignore] decorator. You can use the [Table("")] decorator if you want the actual table name to be different from you class. You can use the [Column("column_name")] for properties.
@pomodorobreaklessons
@pomodorobreaklessons 6 ай бұрын
Nice video. Wouldn't it be better to move the crud methods to a helper or service class?
@SingletonSean
@SingletonSean 6 ай бұрын
Definitely! A service class that returns the Ticket domain object would be ideal
@gregorymoore2877
@gregorymoore2877 5 күн бұрын
I use a singleton Database service for interacting with the database. I have all the CRUD operations implemented using generic methods so that one insert method works for any table/class. Same for read, update, and delete. The Database service opens a connection on app startup and can closes the connection when the app quits. That way, there's no need to create a new connection every time you want to interact with the database.
@billymartin6497
@billymartin6497 3 ай бұрын
You always have such great content. Was surprised that you didn't use a repository. Are you getting away from that?
@SingletonSean
@SingletonSean 3 ай бұрын
Good point! I have been getting away from creating repositories. It's one less layer I need - although as I think about it, there probably are benefits to keeping all the low level database interactions in one cohesive unit. I kind of went through a phase of excessive decoupling long ago. Guess I never re-evaluated my opinions on repositories. I think either approach is fine in the end.
@billymartin6497
@billymartin6497 3 ай бұрын
@SingletonSean I'm really getting into vertical slices. Features folders with a shared folder. Seems to work really well.
@ShahidKhan-vs8bb
@ShahidKhan-vs8bb 3 ай бұрын
Why don't you just use Efcore?
@SingletonSean
@SingletonSean 3 ай бұрын
I find it a little overkill for a .NET MAUI app. In most cases, your app will connect to a SQLite DB, so no need to abstract up to EF. I feel like this SQLite package has everything I need in terms of an ORM, and it is much simpler than EF. I'm sure EF could work as well though.
@sergeylevitskiy4611
@sergeylevitskiy4611 Ай бұрын
Dear Sean, please slow down a bit during your video. Are you in a hurry or the time is somehow limited? It's ok that you think fast, but place yourself on the listener and/or watcher side - consider yourself on some sort of public event - you probably wouldn't like the fast speech and prefer more or less moderate speed
How to Add a Database to Xamarin & .NET MAUI apps with SQLite-net
23:13
James Montemagno
Рет қаралды 78 М.
Why SingletonSean?
5:39
SingletonSean
Рет қаралды 1,3 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
A Better Way to Deal with Complex Bindings in XAML
5:15
SingletonSean
Рет қаралды 1,8 М.
Building a .NET MAUI Application in 7 Days
26:59
SingletonSean
Рет қаралды 2,3 М.
Maui online and offline database: Creating the online database
5:10
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 283 М.
Setup Logging in Your .NET MAUI Application (feat. Serilog)
7:07
SingletonSean
Рет қаралды 2,2 М.
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 987 М.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 316 М.
How to OVER Engineer a Website // What is a Tech Stack?
11:20
Fireship
Рет қаралды 2,5 МЛН
The View Model Lifecycle in .NET MAUI
4:37
SingletonSean
Рет қаралды 1 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН