ASP.NET Core Web API .NET 6 2022 - 3. One-To-Many Relationships

Тәжірибелік нұсқаулар және стиль

ASP.NET Core Web API .NET 6 2022 - 3. One-To-Many Relationships
Github Repo For This Project: github.com/teddysmithdev/poke...
UML Diagram: drive.google.com/file/d/1EbYY...
Twitter: / teddysmithdev
Github: github.com/teddysmithdev
Linkedin: / teddy-smith-015ba61a3
Website: www.teddysmith.io

Пікірлер: 54

  • @dq9342
    @dq9342 Жыл бұрын

    Thanks again! Finished your C# course and progressing in this!

  • @mbulelo-damba
    @mbulelo-damba2 жыл бұрын

    Hi Teddy, thanks for this series of tutorials. I enjoyed and actually learnt a lot regarding your UML Diagram. I'm following this til the end.

  • @justadude8716
    @justadude871610 ай бұрын

    Boosting your videos for the algorithm, great video on relational databases.

  • @user-uc6fs5ke2v
    @user-uc6fs5ke2v Жыл бұрын

    Truly grateful for the selfless sharing by the author, who is truly a great disseminator of technology. Thank you.

  • @TeddySmithDev

    @TeddySmithDev

    Жыл бұрын

    No problem. Thank you for watching!

  • @leafmagi2796
    @leafmagi27962 жыл бұрын

    love you Teddy! Last week i simply just searched keyword like java and you bring me to the new world. I have a similar background as you and i get really confused how can i break into the industry. After that i watch every your video, starting to learn C#. This video explaination is amazing because you can visual the complicated relationship and tell in a smooth way. So i cannot just watch the video and go away. You re really crazy man. it seems that you make video every day and burning yourself. Please take a rest man! you work really really hard! and this video is really good, escpecially the parts of key and relationship. i will keep going and follow your track :D i really appreciate you!!!

  • @TeddySmithDev

    @TeddySmithDev

    2 жыл бұрын

    no joke I read this comment and just said “this guy is right. I ain’t don’t shit today” %100 srs lmao

  • @muttBunch
    @muttBunch10 ай бұрын

    As I'm doing this in my current app, I find myself saying it just like Teddy and moving the mouse, "One...to many...one...to many" lol :D Thanks Teddy.

  • @user-wf8sx3bo8m
    @user-wf8sx3bo8m11 ай бұрын

    Thanks, great video

  • @yankov2206
    @yankov22062 ай бұрын

    Bro really helpfully videos Im trying switch from node js to c# Im frontend react dev But find job on fullstack. My firrst app on node js was todo. I'm was so impressed such simple app is can't find examples on KZread Your cours is a masterpiece! Thanks for sharing. Its really helpful! Best regards!

  • @yankov2206

    @yankov2206

    2 ай бұрын

    btw, where you deployed this app or your own web site? what platform is (i see its not a git or vercel, heroku?)

  • @dzaninkudus3019
    @dzaninkudus3019 Жыл бұрын

    Started my journey as a self taught back-end dev recently and i can say the videos up to now are amazing.I am sure to stick around until the end.Mind me asking also if there is a chance that you do a short tutorial about Git

  • @disapqointed

    @disapqointed

    2 ай бұрын

    How it's going ?

  • @kunying4037
    @kunying40372 жыл бұрын

    thank you so much sir

  • @user-bq2xe3jp4c
    @user-bq2xe3jp4c7 ай бұрын

    Dude after watching sooo many tutorials from developers from India.... listening yours is sooo much cool lol

  • @SweepAndZone
    @SweepAndZone6 ай бұрын

    You're amazing. Glad I found you

  • @HussainAl-ahmdi
    @HussainAl-ahmdi7 ай бұрын

    Thanks man I understood how to write code for relationships after 2days from searching .

  • @caseyspaulding
    @caseyspaulding Жыл бұрын

    Thanks!

  • @cathe9370
    @cathe937010 ай бұрын

    Buen curso!

  • @joaquincataldo8046
    @joaquincataldo804610 ай бұрын

    Hi Teddy, thank you for all this content. I just got one quick question. According to what I saw in Many To Many rels video, we don't need to specify, for example, the country_id field in Owner's model? Because you are referencing the relationship itself but we are not specifying the country_id field.

  • @MrLaCritico
    @MrLaCritico11 ай бұрын

    Thank you x3

  • @codysheridan324
    @codysheridan324 Жыл бұрын

    Hey Teddy great video overall, but I would argue against your comments around 8:40 where you state that an ICollection is not editable. IEnumerable is not editable, but ICollection is derived from IEnumerable and includes additional functionality to add/remove/update elements in the list. Similarly, you state that ICollection will ALWAYS be used in one-to-many relationships for the many.. IEnumerable is also another very popular way to handle one-to-many. Maybe I'm misguiding, so I would love to hear your take on this.

  • @TeddySmithDev

    @TeddySmithDev

    Жыл бұрын

    Thank you for clarifying this. I think I may have been thinking one thing but said another because that makes zero sense. You are indeed correct tho and thank you for commenting!!!!

  • @sdscode
    @sdscode9 ай бұрын

    Definitively agree on the Django Models comment, kinda interesting sometimes XD

  • @chadgregory9037
    @chadgregory90372 жыл бұрын

    1:1 basically like having a complex datatype as an entity field.

  • @Kaivalyamani
    @Kaivalyamani3 ай бұрын

    I guess you are telling it all reverse. For those having confusion in this one-many or many-one relationship, look at some ER daigram examples. Pokemon table is the 'one' endpoint and Review table is the 'many' endpoint i.e. one Pokemon can have many review. We have ICollection in Pokemon table because One Pokemon can have multiple reviews and thats why we need something to hold list of reviews. We have simple Pokemon field in the Review table because one review contains details about a single Pokemon

  • @cryptoeric24
    @cryptoeric24 Жыл бұрын

    Would you add the ? after string for nullable fields?? i.e. public string? Name { get; set; }

  • @andreibudaes3966
    @andreibudaes3966 Жыл бұрын

    Bro...I love your tutorials but 10:01 ...not true...I've worked in Flask with SQLAlchemy and the Model definitions are bliss and relationships are easy one-liners. Muuuuuch easier and cleaner in Python...The only reason I'm learning C# now is because my company builds their API's in C# so I need to up my C# game but would be way less code with Python, Flask and SQLAlchemy...can't comment on Django as I've not used it but if it supports SQLAlchemy I assume it would be similar. Here's an example. I have a CoinInfo model in which the symbol_id is a Foreign Key for a table called TickerData. I don't have to have 3 locations to define this connection (like in the many-to-many you need to add some lines in the Primary table, the Ref table and the DataContext class). ```python class CoinInfo(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) symbol_id = db.Column(db.Integer, db.ForeignKey('ticker_data.id')) insert_timestamp = db.Column(db.DateTime, default=datetime.utcnow()) update_timestamp = db.Column(db.DateTime, default=datetime.utcnow(), onupdate=datetime.utcnow()) ticker_data = db.relationship('TickerData', backref='coin_info', uselist=False) ```

  • @kvelez
    @kvelez2 ай бұрын

    Cool

  • @random-bd3xg
    @random-bd3xg Жыл бұрын

    Hi can you make like a project with dal bal layer with like calling stored procedure also using azure please 😢😢😢😢😢😢

  • @Hollowendz
    @Hollowendz2 жыл бұрын

    Hey teddy drop the uml Link

  • @user-wf8sx3bo8m
    @user-wf8sx3bo8m11 ай бұрын

    foreign key - relation to other tables

  • @user-gk1lj3me4e
    @user-gk1lj3me4e2 ай бұрын

    Can I use Mysql instead sql server for doin this?

  • @chadgregory9037
    @chadgregory90372 жыл бұрын

    So is this the method for doing specifically Web API models... or is this just one method of doing models for both Web API and MVC... I'm a bit of a "toil on things" person rather than "its good enough to keep building what im doing" ... lol... so I got hung up a little on models... and I've come to find out there are multiple methods, convention based relations and fluent api based relations. I like getting my head around everything, and then when I get building again things happen fast

  • @chadgregory9037

    @chadgregory9037

    2 жыл бұрын

    The many to many is what I still get pretzel brained about, as sad as it is to admit lol. I'll blame other life things at the moment though lol. One to many is easy, as in one blog entry can have many comments. Many to many is where things get stupid lol. Like, many to many is easy in the context of say having AppUsers to follow each other.... AppUser can have many followers, and they can also follow many people. The relation is between the AppUser entity and itself, if you will.... But say, Blogs and AppUsers where AppUser can follow blogs and where a blog can have many followers.... I guess it's the same shit, just a join table entity and the 2 foreign keys, just from two separate classes instead of the same class. I need to learn to not make things so fucking complicated lol

  • @codysheridan324

    @codysheridan324

    Жыл бұрын

    @@chadgregory9037 Many-to-many can be extremely difficult to wrap your head around, and there are sadly not very many good tutorials out there about how to efficiently implement a many to many relationship. As you begin to look into many to many relationships you will have to also consider the cascading effects of CRUD operations on your database, as your models now implement primary/foreign key relationships in multiple places.

  • @Cursix
    @Cursix Жыл бұрын

    Teddy i have a question why is some dev using [forgnkey] and some people dont isnt it better to use that?

  • @TeddySmithDev

    @TeddySmithDev

    Жыл бұрын

    Either way is fine. Entity framework has abstracted away the need to have foreign key today, but the way I have is more "explicit". Thanks for commenting!

  • @Cursix

    @Cursix

    Жыл бұрын

    @@TeddySmithDev thank you for explaining

  • @nesa6582
    @nesa6582 Жыл бұрын

    what to do with enums when making models?

  • @TeddySmithDev

    @TeddySmithDev

    Жыл бұрын

    In my MVC course I have an example of enums in models.

  • @RAMATW2023
    @RAMATW20233 ай бұрын

    I am confused, Upon setting public Country Country { get; set; } ( @9:14 ) I get Country is a namespace but used like a type.

  • @TeddySmithDev

    @TeddySmithDev

    3 ай бұрын

    You probably have a misplaced/misspelled keyword in Country

  • @RAMATW2023

    @RAMATW2023

    3 ай бұрын

    @@TeddySmithDev I didnt, I tried to change it up and missed things up. The namespace ending had the same name "Country" as the class name. Visual studio would only let me select the namespace. I changed the class "Country" to "Country1" to test, I was then able to use the "Country1" class.

  • @meltygear5955

    @meltygear5955

    3 ай бұрын

    @@RAMATW2023 I'm following the same video and I don't get that problem. Are you sure you have all required files in the Models folder and your namespace at the top of every model file is "namespace PokemonReviewApp.Models"?

  • @Synergy_World
    @Synergy_World2 жыл бұрын

    South Africa is here

  • @user-pr5qc5jr4k
    @user-pr5qc5jr4k4 ай бұрын

    Teddy can you give all database code , Thanks In Advance

  • @TeddySmithDev

    @TeddySmithDev

    4 ай бұрын

    Sry database was deleted way back

  • @user-pr5qc5jr4k

    @user-pr5qc5jr4k

    4 ай бұрын

    ​@@TeddySmithDev I'm perplexed by the database and struck by the database. Please help me to provide the dbcode.

  • @John_Noble
    @John_Noble6 ай бұрын

    What company do you work for? If it is not a secret

  • @TeddySmithDev

    @TeddySmithDev

    6 ай бұрын

    You can see all past companies I’ve worked for on LinkedIn but I keep current secret because people are crazy.

  • @RamiR2
    @RamiR2 Жыл бұрын

    I don't like the fact that you used Pokemon, use a real world example that many people will understand. What's a review?

  • @TeddySmithDev

    @TeddySmithDev

    Жыл бұрын

    Replace the words with something that is relevant to your life and learn better 👍

  • @user-mo1sq4mt7l
    @user-mo1sq4mt7l7 ай бұрын

    you need to improve your teaching skills

Келесі