ASP.NET Core MVC 2022 - 2. Models

Поділитися
Вставка
  • Опубліковано 6 жов 2024

КОМЕНТАРІ • 69

  • @justshukri9407
    @justshukri9407 2 роки тому +2

    thank for making the vid straight to the point and not 2hr long vid where i gave-up half way

  • @gersonmoraes8516
    @gersonmoraes8516 2 місяці тому +1

    Hello from Brazil..
    Thanks for sharing bro 🚀🚀🚀

  • @JFresh1977
    @JFresh1977 2 роки тому +4

    Really enjoying this series so far! Thanks so much! A couple questions I have:
    1. What does the ? after the data type signify? I assume it means it *might* be that data type?
    Also - at the end you mention how you gave thought to how you used "object model" thinking to logically think about your tables and the like. I think a video on how you approach a project such as this one and how you work through things ahead of time before writing your code would be a very instructional and fantastic video to see.

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому +3

      called a null referenence/null coalescing. I have a video on it. Also, might consider making an abstraction video that includes entity framework tables. Thanks for the idea!

    • @dust_sucka
      @dust_sucka Рік тому

      @@TeddySmithDev I don't think it is null coalescing, just a nullable value declaration. Null coalescing is different - both use a ? though.
      Thanks for the vid, Teddy. Very helpful.

    • @arthurspears8477
      @arthurspears8477 Рік тому

      It means the type is nullable. As in, you can state that value as being = null. Null coalescing uses a ?? to create an inline version of "if var == null do this else do that"

    • @divyanshchaudhary7063
      @divyanshchaudhary7063 9 місяців тому

      ? - > could be nullable

  • @BrandonJackson-k9d
    @BrandonJackson-k9d 2 місяці тому

    Still an awesome training. Thanks

  • @hildaavelar3076
    @hildaavelar3076 2 роки тому +7

    Jumping from one thing to other.

  • @MyAutist
    @MyAutist Рік тому

    Thanx, Teddy, for an amzing series!

  • @harvey_04
    @harvey_04 Рік тому +1

    Thanks for the playlist buddy

  • @ashrafrasulov4353
    @ashrafrasulov4353 Рік тому +3

    where is the Database example, i can't to contitue without Database

  • @vinhnguyen-tu9cc
    @vinhnguyen-tu9cc 11 місяців тому

    I'm really appreciate your efforts, keep going Teddy, wish you all the best

  • @karthiklagvankar8057
    @karthiklagvankar8057 Рік тому

    Hey jolly good tutorial series mate. As a cyclist myself really enjoying building this app.
    Cheers!

  • @jeremyonyx299
    @jeremyonyx299 Рік тому

    Thanks for the playlist.

  • @nox5282
    @nox5282 5 місяців тому

    I recommend you edit the videos more to the point, this will make your videos shorter and more valuable. Im going through the series, but its one thing i noticed would improve your videos allot.

  • @bucovalasebastian-nicu5755
    @bucovalasebastian-nicu5755 Рік тому +1

    Hey, Teddy, I think you made a mistake. Your AppUser foreign key uses a string instead of an integer. I've checked the repo and it's the same there. I haven't watched the whole series yet, so I'm not sure if it's a mistake or If you have a reason for choosing that type.

    • @bucovalasebastian-nicu5755
      @bucovalasebastian-nicu5755 Рік тому +5

      Back with an update, it wasn't an error. The AppUser class inherited some properties from IdentityUsers (the primary key included). If it were defined by us, then an int would have been enough. As it is, it's a string.

  • @amjadsultanawan
    @amjadsultanawan 4 місяці тому

    How connect database to this App ???

  • @lance9800
    @lance9800 4 місяці тому

    super helpful

  • @masterchief5437
    @masterchief5437 3 місяці тому

    TY!

  • @ianwanjala8621
    @ianwanjala8621 11 місяців тому

    I think race to user should be many to many, also club to user should be many to many. I loved how you used the enums also, so thanks for that.

  • @shamsundar1675
    @shamsundar1675 2 роки тому +3

    Bro! When you opened SQL Management Studio, the things you created like Id, Street, City, State is showing in the database but not mine, what is the reason, do I have to connect my project to SQL server before with that code?? Please guide... Thanks

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому

      In upcoming video, I just showed that to introduce concept of model properties being columns in db. Sorry for confusion.

  • @kareemabdallah1340
    @kareemabdallah1340 Рік тому +1

    Is it normal to feel lost and confused in this video i felt like too much information.. aldo after finishing the c# is this course is the next step or should i watch another playlist

    • @miraycalk4418
      @miraycalk4418 9 місяців тому

      same...
      we will get this im sure

  • @jackal192
    @jackal192 5 місяців тому

    Thx alot big bro

  • @astianmuchui
    @astianmuchui 5 місяців тому

    Perfect

  • @HAMEDMHMDI
    @HAMEDMHMDI Рік тому

    Can you Explain how connect database to project?
    Actually I’m just using sqlite :(

  • @susmantobealivebruh4238
    @susmantobealivebruh4238 2 роки тому +1

    Heyyy what does a enum do when we add it to the model fields?

  • @theunlikelyoverlander538
    @theunlikelyoverlander538 9 місяців тому

    Are the playlists, A start to finish tutorial for building the application?

  • @AboElHag74
    @AboElHag74 Рік тому

    I think the relationship between the user and both club and race should be many to many relationship why you did it as one to many

  • @enesylmaz3261
    @enesylmaz3261 8 місяців тому

    How you connect database ? İ wish you show these parts

  • @caseyspaulding
    @caseyspaulding Рік тому

    Thanks

  • @DF17699
    @DF17699 Рік тому

    Hi, can you explain what is the use of ICollections in the AppUser model

    • @AboElHag74
      @AboElHag74 Рік тому +1

      Because the relation between the user and both the race ,club is 1:m which means
      That one user can participate in many races and club

  • @doriansmith5667
    @doriansmith5667 3 місяці тому

    Where can I get the Database Script or .bak?

  • @dardanm3544
    @dardanm3544 Рік тому

    Wait there's already a hat change? No but seriously greatcontent so far

  • @kvelez
    @kvelez 5 місяців тому

    Interesting.

  • @Martin-yn2ys
    @Martin-yn2ys 2 роки тому +2

    POCO = Plain Old Class Objects

  • @paulmccauley8690
    @paulmccauley8690 2 роки тому

    Hey Teddy great course. I just wanted to know if there is a way to select or add multiple tags? I tried changing the select input to accept multiple but the table only recieves one.

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому

      Is there any error? Which specific value does it store?

    • @paulmccauley8690
      @paulmccauley8690 2 роки тому

      @@TeddySmithDev Hey, no errors it's weird it just selects the first option clicked on from the multi select drop down. I'm sure it's something to do with the logic in post and maybe needs to loop through so that each category is added as a new record. I just don't know enough yet 😃

  • @AnishMoktan-hk2wk
    @AnishMoktan-hk2wk 4 місяці тому

    where is the club codes to copy?

    • @university8883
      @university8883 3 місяці тому

      public int Id { get; set; }
      public string? Title { get; set; }
      public string? Description { get; set; }
      public string? Image { get; set; }
      [ForeignKey("Address")]
      public int? AddressId { get; set; }
      public Address? Address { get; set; }
      public ClubCategory ClubCategory { get; set; }
      [ForeignKey("AppUser")]
      public string? AppUserId { get; set; }
      public AppUser? AppUser { get; set; }

  • @ryans6421
    @ryans6421 Рік тому +8

    Very difficult to follow. You are here, there and everywhere. Like you trying to show off that you can type and talk at same time.. Try to stay on point mate 🙂

  • @1Eagler
    @1Eagler 11 місяців тому

    Why not putting all classes in one codefile?

    • @Seppe_B
      @Seppe_B 11 місяців тому

      It's possible, but it's messy

    • @1Eagler
      @1Eagler 11 місяців тому

      @666kabauter is it? I prefer choosing the class from the dropdown list than having to open 10 files and browse around the files.

    • @tprnbs
      @tprnbs 8 місяців тому

      @@1Eagler if you want to create for example User and Admin objects (admin will have some different fields and methods) if you have one class for everything admin and user will have same fields and methods and users would be allowed to do everything admin can do(there will be no way for computer to distinguish them)

    • @1Eagler
      @1Eagler 8 місяців тому

      @@tprnbs not one class but one file with similar classes

    • @tprnbs
      @tprnbs 8 місяців тому

      @@1Eagler if you have multiple classes in one file it can be hard to read(if it's small project than it's not a problem), separation of concerns and encapsulation/abstraction might be another issues, compilation time might be longer, if you need to have field like "id" for each class it'll be naming mess

  • @jetspray3
    @jetspray3 Рік тому

    Plain Old CLR Objects (POCO)

  • @lamvutung2235
    @lamvutung2235 11 місяців тому

    where can i get the SQL

    • @TeddySmithDev
      @TeddySmithDev  11 місяців тому

      EF Core. That is coming up in next videos.

  • @dianafarhat9479
    @dianafarhat9479 Рік тому

    Hey. What's the ? in the return type

    • @TeddySmithDev
      @TeddySmithDev  Рік тому

      It is likely a null operator

    • @dianafarhat9479
      @dianafarhat9479 Рік тому

      @@TeddySmithDev Oh yeah so it in your other comment. Thanks for the great content!

  • @boky7731
    @boky7731 Рік тому

    7:47

  • @Djsore22
    @Djsore22 Рік тому +1

    Damn you don't explain so much lol hahaha why you put foreign key and primary key if by default you have them with that in the database?

  • @ahmetsezer1127
    @ahmetsezer1127 2 роки тому

    Hi, can you give me database ? (I subscribed :))

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому +1

      You gotta make your database buddy!

    • @ahmetsezer1127
      @ahmetsezer1127 2 роки тому

      @@TeddySmithDev yeah, i think i'll understand when i get a little further. Thank you

  • @MuhammadNadeemLDR
    @MuhammadNadeemLDR 2 роки тому

    The relationship from 'Club.AppUser' to 'AppUser.Clubs' with foreign key properties {'AppUserId' : string} cannot target the primary key {'Id' : int} because it is not compatible. Configure a principal key or a set of foreign key properties with compatible types for this relationship.
    if have copy-paste classes but I am facing this error. Please Guide me.

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому

      post screenshot in discord for quick help. Can't say exact but you need to set foreign key and primary key relationship with sql query. Google "set foreign key sql server".