Entity framework core migrations

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 167

  • @naodagere8210
    @naodagere8210 4 ปีที่แล้ว +29

    I am always amazed by the amount of time and energy you invest while preparing these materials.Still for free.Thank you so much.

  • @ПавелБываев
    @ПавелБываев 5 ปีที่แล้ว +108

    I cant use Add-Migration before installed "Microsoft.EntityFrameworkCore.Tools"
    in PM console: Install-Package Microsoft.EntityFrameworkCore.Tools

    • @amey203
      @amey203 4 ปีที่แล้ว

      thank u so much bro .it helped me

    • @erkangorgulu6013
      @erkangorgulu6013 4 ปีที่แล้ว

      I knew i was missing a package but thinking what it could be. Much appreciated.

    • @amermagdy5440
      @amermagdy5440 4 ปีที่แล้ว +2

      if there is any rollback try to specify the version by this command line
      Install-Package Microsoft.EntityFrameworkCore.Tools -Version 2.1.14
      also for guarantee your needed version look in the warning

    • @jainamshah5681
      @jainamshah5681 4 ปีที่แล้ว +1

      Helped me too. Thanks a lot.

    • @hexlatino3421
      @hexlatino3421 4 ปีที่แล้ว

      Thank u. you saved me at least 1 hour of my time :)

  • @stephenriding6460
    @stephenriding6460 4 ปีที่แล้ว +1

    Couldn't figure out for the life of me how to actually create the database. Didn't know about update-database. Thank you so much for this video!

  • @yasirirfan5262
    @yasirirfan5262 6 หลายเดือนก่อน

    You are making great .NET Engineers.
    Be blessed.

  • @hzubaca
    @hzubaca 4 ปีที่แล้ว +1

    simple, and straight to the point! Kudos!

  • @hamedbakhtiari7540
    @hamedbakhtiari7540 4 ปีที่แล้ว +7

    Thank you, so much , but in .net core 3 and newer version we should install EntityFrameworkCore.Tools and then use Add-Migration

  • @talkathiriify
    @talkathiriify 5 ปีที่แล้ว +3

    Thank you again
    for the excellent video
    Best regards

  • @ljupconewman9357
    @ljupconewman9357 5 ปีที่แล้ว +1

    Eloquent and excellent.
    One thing though, after i added a migration and updated the database I can't see it in sql server. I tried by changing the connection string in several ways, but it didn't change anything. Maybe show this in your next video?

    • @saivaibhavmedavarapu7383
      @saivaibhavmedavarapu7383 5 ปีที่แล้ว

      Can you send me the code of this project on vaibhav.medavarapu@gmail.com. It really helps me in catching up. Thanks

    • @menaf77
      @menaf77 5 ปีที่แล้ว

      the same here too i can't see the database created in the sqlserver. pls share how you get it work

    • @bulldog2024
      @bulldog2024 5 ปีที่แล้ว

      You might have to refresh the database and it should be there.

  • @neilsumanda1538
    @neilsumanda1538 4 ปีที่แล้ว +3

    i always wonder how much effort the developers into this migration.. in practice, u dnt create a database from the ground-up, u work with an existing database with actual records.. or did i missed something here...?

  • @vaibhavtrikolikar4902
    @vaibhavtrikolikar4902 3 หลายเดือนก่อน

    Thank you Sir for another great video As usual:)

  • @zn6151
    @zn6151 3 ปีที่แล้ว

    The explanation is amazing 👏

  • @honeesh1
    @honeesh1 5 ปีที่แล้ว

    My teacher thank you very much
    Very useful lectures too
    Thank you from the depths

  • @jrh383
    @jrh383 3 ปีที่แล้ว

    Hola prof. este método de migraciones da terror, ya que si cuento con bases de datos de cientos de gb, no me convence que el programador tenga acceso a esto, ya que por una mala programación pueden borrar los datos, además existen especialistas en BD, por favor podrías indicar si tienes un enfoque base de datos primero. Y de veras muchas pero muchas gracias por dedicar tanto de tu tiempo y explicas perfectamente. nuevamente gracias.

  • @1eagleusa
    @1eagleusa 5 ปีที่แล้ว

    Question about field creation, the filed for department is enum and is nullable, in the video it creates the filed in the table as integer and nullable if false. I think I understand the integer part but should it be nullable because the field is nullable? What if it was desired to have the field nullable how would it be accomplished to signify nullable field during migration? Thank you for all your hard work.

  • @xinjinli6442
    @xinjinli6442 2 ปีที่แล้ว +1

    Really good material.
    But I have a question.
    When I have only schema updates, everything works okay.
    Now I have seed methods to add some records to the database.(For example menu items, rights, roles)
    And I tried to run add-migration whenever I have updates in schemas.
    It worked yet.
    But I wanted to add some more records. I mean I updated the seed methods.
    And then run
    add-migration update_seed.
    After that, update-database failed.
    Would you help me with how to handle the cases?

  • @00kiss00L
    @00kiss00L 4 ปีที่แล้ว +1

    If you are using MacOS version of Visual Studio, you might stuck at this episode. You won't find SS Object Explorer nor Package Manager Console because none of those are supported. Here is what I did:
    1. Install NuGet PowerShell Core Console:
    lastexitcode.com/blog/2019/05/05/NuGetPowerShellCoreConsoleVisualStudioForMac8-0/
    2. Install Entity Framework Core tools:
    docs.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell
    3. Install SQL Server on Mac (Docker + Azure Data Studio):
    database.guide/how-to-install-sql-server-on-a-mac/
    4. Change the connection string to something like this:
    "Server=localhost;Database=sql_server_demo;User Id=sa;Password=ReallyStrongPwd123"

  • @sathyavenkatesh5047
    @sathyavenkatesh5047 4 ปีที่แล้ว +1

    I think this Migration is only for Code First approach right and not for Database First approach ?

  • @AllanMadsenDK
    @AllanMadsenDK 5 ปีที่แล้ว

    Is it possible to use the PM to create and manage stored procedures? I have been told, that using stored procedures, is the safest way, to interact with the SQL database.
    Thank you for some very great toturials!!

  • @lin4469
    @lin4469 3 ปีที่แล้ว +1

    I have an error...
    The specified deps.json [D:\GitFirstCode\OnlineShop\Shop.UI\Shop.UI.deps.json] does not exist

  • @bulldog2024
    @bulldog2024 5 ปีที่แล้ว +1

    Thanks again for the great content.

  • @lifetraveler8008
    @lifetraveler8008 4 ปีที่แล้ว +1

    I am getting the following error
    System.ArgumentNullException: 'Value cannot be null. (Parameter 'connectionString')'
    help please!!
    I found the problem
    The ConnectionStrings inthe appsetting.json had space in between the word Connection and string . It should be "ConnectionStrings" and not "Connection Strings"

    • @rashedalqadi3695
      @rashedalqadi3695 4 ปีที่แล้ว

      stackoverflow.com/questions/40874640/value-cannot-be-null-parameter-name-connectionstring-appsettings-json-in-start
      there is some solution

  • @coolwaterdvr
    @coolwaterdvr 5 ปีที่แล้ว +1

    Thank you Venkat.

  • @eugene-white-shark
    @eugene-white-shark 3 ปีที่แล้ว

    Thank you very much!

  • @TheHPure
    @TheHPure 3 ปีที่แล้ว +1

    What about database first approach? I'm having really hard time figuring this out..

  • @sinanukuslu5420
    @sinanukuslu5420 5 ปีที่แล้ว

    Çok teşekkür ediyorum. Çok iyi anlatıyorsunuz.

  • @jaikialves3186
    @jaikialves3186 3 ปีที่แล้ว

    Thank you, your video save me

  • @mprto68
    @mprto68 ปีที่แล้ว +1

    I keep getting an error when migrating "unable to create an object of type 'dbcontext'."

    • @WBal-xm9sm
      @WBal-xm9sm 2 หลายเดือนก่อน +1

      1- Make sure all the projects in your solution are free from errors.
      2- Make sure your connection string in the appsettings.json file in you WEB API project is pointing to your right database, whether your local or the the environment you intend to deploy this migration
      3- Make sure your "startup project" points to WEB API while your project on the package manager console points to data access project or your web api if you have everything in your web api ONLY (NOT RECOMMENDED).
      4- RUN UPDATE-DATABASE.
      5- Cheers, grab a beer and relax!

  • @MmMm-tg5mq
    @MmMm-tg5mq 5 ปีที่แล้ว

    very informative nice video thanks a lot

  • @arpitmahyavanshi9282
    @arpitmahyavanshi9282 ปีที่แล้ว

    i dont have any data in the db so i have to put some data in it or it will be done automatically accordin to this video

  • @DecklonNyarko
    @DecklonNyarko 5 ปีที่แล้ว +1

    Hiya, thanks for your hard-work very much appreciated. my project given me the error "There is already an object named 'AspNetRoles' in the database." when i tried to update database

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  5 ปีที่แล้ว +1

      Hello Decklon - That's a bit strange. These kind of errors usually happen if we manually create or change Identity tables without going through migrations.

  • @prithupaul5177
    @prithupaul5177 4 ปีที่แล้ว +1

    Getting this exception while using "Add-Migration" command Method 'Create' in type 'Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerSqlTranslatingExpressionVisitorFactory' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=3.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. anyone can help?

  • @fermidu8811
    @fermidu8811 4 ปีที่แล้ว

    How can I update a dbcontext if I´m using database first? I hava my database ready, just need to update de context on EFCore 3.1, any help please?

  • @leoniduvarov6565
    @leoniduvarov6565 4 ปีที่แล้ว

    Very clear, thank you!

  • @jihedjaoidi4313
    @jihedjaoidi4313 5 ปีที่แล้ว +4

    Plz I want buy à tutorial for unit test how I do that plz thank you

    • @VinuP2023
      @VinuP2023 5 ปีที่แล้ว +2

      Venkat has a tutorial on Unit Testing in Udemy. Please find it

    • @ljupconewman9357
      @ljupconewman9357 5 ปีที่แล้ว

      @@VinuP2023 does he have about other topics?

  • @AhmedGamalGIS
    @AhmedGamalGIS 5 ปีที่แล้ว

    thanks alot My teacher need tutorial for unit test in asp.net core

  • @Viktor_fff
    @Viktor_fff ปีที่แล้ว

    Thanks for help)

  • @Ty1er
    @Ty1er 2 ปีที่แล้ว

    So far so gud

  • @HarshRaj-pu4gi
    @HarshRaj-pu4gi 4 ปีที่แล้ว +1

    I am getting error while trying to insert data saying "Cannot insert explicit value for identity column in table ' ' when IDENTITY_INSERT is set to OFF. Do anyone knows solution to this?

    • @gealglover2479
      @gealglover2479 4 ปีที่แล้ว

      First thing I noticed is the table "Employees" will be built with field "Id" being an identity column. The migration shows .Annotation("SqlServer:Identity", "1, 1") while his tutorial shows .Annotation("SQLserver:ValueGenerationStrategy"). You should therefore not supply a value for the Id when inserting data.

  • @halivudestevez2
    @halivudestevez2 3 ปีที่แล้ว

    thank you, Sir, it's clear now! :)

  • @henimex
    @henimex 3 ปีที่แล้ว

    Thank you. Again

  • @areensahu5299
    @areensahu5299 3 ปีที่แล้ว

    I dont why I cant use Commands like Add-migration and Update Database. I have also tried installing Microsoft.Entityframeworkcore.tools NuGet package but it wont install. Please help.

  • @lennonfernandes1696
    @lennonfernandes1696 2 ปีที่แล้ว

    I am getting "build failed" error while running the command "add-migration migrationName"
    Earlier I had accidentally typed "update-database migratonName" instead of "add-migration migrationName" and then got an error. From then on I am getting "build failed" error..

  • @khoinguyen4400
    @khoinguyen4400 5 ปีที่แล้ว

    How can I create a table within an existing schema when I run update-Database. Please help

  • @MuhammedAli-nu4tb
    @MuhammedAli-nu4tb 5 ปีที่แล้ว

    "Format of the initialization string does not conform to specification starting at index 0." I get an error

  • @arpansarkar7924
    @arpansarkar7924 4 ปีที่แล้ว +1

    If you are getting error during add-migration Install Entity framework core package.

  • @ymn76ymn
    @ymn76ymn 3 ปีที่แล้ว

    thanks for you

  • @TheSivac
    @TheSivac 4 ปีที่แล้ว

    Any help for this error I get: "The entity type 'Pile' requires a primary key to be defined. If you intended to use a keyless entity type call 'HasNoKey()". I already tried putting the [Key] attribute above my PileId property... Didnt help

  • @alwaseem5309
    @alwaseem5309 5 ปีที่แล้ว

    Awesome !

  • @rayt6867
    @rayt6867 5 ปีที่แล้ว

    So far so good, Excellent tutorial, Is the source code in Github or any other place to download it, so that I can compare with mine to keep the videos in sink? Thank you very much.

    • @hooiyan6040
      @hooiyan6040 5 ปีที่แล้ว

      Hi! The souce code can be found on the blogspot. You can check them out at the description section under every videos. :)

  • @arunnayak3342
    @arunnayak3342 3 ปีที่แล้ว

    Please make a video on Response caching in .net core if possible

  • @kokaneehooman
    @kokaneehooman 4 ปีที่แล้ว

    package manager console does not recognize the add-migration command. how do fix this?

    • @krishnakishore2889
      @krishnakishore2889 4 ปีที่แล้ว

      in the package manager console run this command Install-Package Microsoft.EntityFrameworkCore.Tools

  • @mohammadhilal8508
    @mohammadhilal8508 4 ปีที่แล้ว

    While doing migration it gives an error deps. Json(path) does not exist.

  • @mdsaddamkhan8400
    @mdsaddamkhan8400 4 ปีที่แล้ว

    I am getting this error in Package Manager console
    invalid value for key ' integrated security'
    Please someone help

  • @amreenmujahed76
    @amreenmujahed76 5 ปีที่แล้ว

    hello venkat sir please help me ,i m unable to update-database cammand in console package manager

    • @lukedodson3441
      @lukedodson3441 5 ปีที่แล้ว

      Same

    • @Rakesh_Bandaru
      @Rakesh_Bandaru 4 ปีที่แล้ว

      MOdify connection string as "EmployeeDBConnection": "Server=.;Database=EmployeeDB;Trusted_Connection=true"

  • @ypwygk652
    @ypwygk652 3 ปีที่แล้ว

    i have this error, Method 'Create' in type 'Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerSqlTranslatingExpressionVisitorFactory' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=3.1.10.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.

  • @coderggk6819
    @coderggk6819 4 ปีที่แล้ว

    But 99% of projects does have existing Database. does it means this code first wont work?

  • @КсенияЮдина-ж6о
    @КсенияЮдина-ж6о 5 ปีที่แล้ว

    I can't find the mdf file..

  • @sanaafzal5316
    @sanaafzal5316 5 ปีที่แล้ว

    thankyou sooooo much sir for these course......actually i have some problem in package manager console.......when i write Update_Database there is error occour. version problem how i solve this problem
    (The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.11-servicing-32099'. Update the tools for the latest features and bug fixes.)

    • @tarn4t1on79
      @tarn4t1on79 5 ปีที่แล้ว +1

      That's not an error, that's a warning. It'll still work just fine.

  • @التاريخ-ح4ظ
    @التاريخ-ح4ظ 4 ปีที่แล้ว

    PlatformNotSupportedException: LocalDB is not supported on this platform. ??ubuntu

  • @AndrewBarzyk
    @AndrewBarzyk 5 ปีที่แล้ว

    I cannot get the migration to work. I ran it -v to get the error:
    Microsoft.EntityFrameworkCore.Design.OperationException: Unable to create an object of type 'AppDbContext'. For the different patterns supported at design time, see go.microsoft.com/fwlink/?linkid=851728 ---> System.MissingMethodException: No parameterless constructor defined for type 'ConciergeApp.Models.AppDbContext'.
    at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
    at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
    much Internet ink was spilled on removing the dbContext from Startup.cs and moving it to Program.cs...
    I know my connection string is ok (MYSQL) because when I create the database and tables columns manually my application runs. I am using the latest version of Visual Studio Community 2019. Has MS changed something again???

    • @AndrewBarzyk
      @AndrewBarzyk 5 ปีที่แล้ว

      I got it working. I was using Visual Studio 2019. Apparently in true MS style, they released it without full support for a bunch of features.

  • @SPRajOfficial
    @SPRajOfficial 4 ปีที่แล้ว

    I want to create mysql db migrations code first? Can u guide?

    • @goldencourses645
      @goldencourses645 3 ปีที่แล้ว

      Just Install this package mysql.entityframeworkcore5.0.0 instead of SQL.EntityFramework and do the same (connection string to your mysql db)

    • @meeramaahidoshi1207
      @meeramaahidoshi1207 3 ปีที่แล้ว

      @@goldencourses645 can u suggest me the connection string to sql server connection as i am getting error in it
      what would be the connection string if we want to connect to sqlserver with sql server authentication
      "EmployeeDBConnection" : "server=(192.168.1.97,9905
      )\\sa;database=EmployeeDB;Trusted_Connection=True"
      got confused. where the pwd and authentication to be entered

  • @sebastianph4378
    @sebastianph4378 4 ปีที่แล้ว +1

    how can I resolve this error in the package manager console, "Unable to create an object of type 'appDbContext'. For the different patterns suppported at design time, see go.microsoft.com/fwlink/?linkid=851728"

    • @marwan_sa5905
      @marwan_sa5905 4 ปีที่แล้ว

      I'm facing the same issue, have you resolve it ?

    • @marwan_sa5905
      @marwan_sa5905 4 ปีที่แล้ว +1

      o solve it the issue was i was missing ( , ) in appsetting.json after MyKey there was , missing
      {
      "Logging": {
      "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
      }
      },
      "AllowedHosts": "*",
      "MyKey": "Value of MyKey from appsettings.json",
      "ConnectionStrings": {
      "EmployeeDBConnection": "Server=(localdb)\\MSSQLLocalDB;database=EmployeeDB;Trusted_Connection=true"
      }
      }

  • @mdsaddamkhan8400
    @mdsaddamkhan8400 4 ปีที่แล้ว

    i am getting this exception please help me
    ArgumentException: Invalid value for key 'integrated security'.

    • @PriyankaSoni2014
      @PriyankaSoni2014 4 ปีที่แล้ว

      try Trusted_Connection=True instead of integrated security at EmployeeDBConnection in Appsetting.json file

    • @mdsaddamkhan8400
      @mdsaddamkhan8400 4 ปีที่แล้ว

      @@PriyankaSoni2014 yup... I used the same I am getting different level of error right now

    • @Abhimanyukumar-vb8bz
      @Abhimanyukumar-vb8bz 4 ปีที่แล้ว

      @@mdsaddamkhan8400 use -> integrated security= SSPI

  • @lejinad5
    @lejinad5 5 ปีที่แล้ว

    Hello!
    I am getting error when try to Add-Migration in PM:
    PM> add-migration
    cmdlet Add-Migration at command pipeline position 1
    Supply values for the following parameters:
    Name: InitialMigration
    No migrations configuration type was found in the assembly 'WebApplication5'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).
    When I type Enable-Migrations it said "No migrations configuration type was found in the assembly WebApplication5"
    But I do have AppDbContext.cs in dir. Models, and I have public class AppDbContext : DbContext (using Microsoft.EntityFrameworkCore)
    Can you please help me why I got this error?
    Thanks for great content!

  • @RachitJain4U
    @RachitJain4U 3 ปีที่แล้ว

    Thanks sir :)

  • @amermagdy5440
    @amermagdy5440 4 ปีที่แล้ว

    if there is any rollback try to specify the version by this command line
    Install-Package Microsoft.EntityFrameworkCore.Tools -Version 2.1.14
    also for guarantee your needed version look in the warning

  • @SrikanthPuli4
    @SrikanthPuli4 4 ปีที่แล้ว

    Could you make payment gateway in c# .net please.

  • @BalooCSGO69
    @BalooCSGO69 4 ปีที่แล้ว +1

    You fucking king, You helped me so much, thank your my good friend.

  • @avitwito1734
    @avitwito1734 5 ปีที่แล้ว +1

    How did it knew that the primary key should be ID? (table.PrimaryKey("PK_Employees", x => x.Id);)

    • @bulldog2024
      @bulldog2024 5 ปีที่แล้ว +1

      I believe, by convention, Entityframework will automatically look for a field that contains the term 'Id' and make that the primary key unless you use the [Key] attribute.

  • @muhammetsamkara1074
    @muhammetsamkara1074 4 ปีที่แล้ว

    when program trying to read EmployeeDBConnection in start up I get an error of "System.ArgumentNullException: 'Value cannot be null.
    Parameter name: connectionString'
    " anybody who can help?

    • @renanrosa5527
      @renanrosa5527 4 ปีที่แล้ว

      You are missing the letter 's' after the ConnectionString property name in the appsettings.json when using Configuration.GetConnectionString("name")
      Here is mine:
      "ConnectionStrings": {
      "EmployeeDBConnection": "server=(localdb)\\MSSQLLocalDB;database=EmployeeDB;Trusted_Connection=true"
      }

  • @OutNumbered41
    @OutNumbered41 2 ปีที่แล้ว

    Every time I attempt to do this I get an error saying Could not load assembly ''. Ensure it is referenced by the startup project 'Entity'

  • @karimkazia
    @karimkazia 5 ปีที่แล้ว +1

    Excellent Video. though I came across an issue during the first process of migrations. i had to replace _config with configuration.UseSqlServer(XXXXXXX). otherwise it was not able to resolve the connection string name

  • @balkishan2k11
    @balkishan2k11 3 ปีที่แล้ว

    How to implement automatic migrations without any dataloss

  • @ypwygk652
    @ypwygk652 3 ปีที่แล้ว

    i have error
    Exception has been thrown by the target of an invocation.

  • @darkogele
    @darkogele 5 ปีที่แล้ว +4

    Great job as always keep it up ill build you a Monument if i become rich :D

    • @MmMm-tg5mq
      @MmMm-tg5mq 5 ปีที่แล้ว

      I think he didn't need your Monument , if you can help just donate at his blog

    • @argeltal9090
      @argeltal9090 4 ปีที่แล้ว +1

      И јас го делам истото мислење за чоеков !

  • @kassandrasandoval8195
    @kassandrasandoval8195 4 ปีที่แล้ว

    How does it know to name the database EmployeeDB?

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  4 ปีที่แล้ว +1

      Hello Kassandra - The database name is specified in the conncection string in appSettings.json file. Hope this answers your question.

    • @kassandrasandoval8195
      @kassandrasandoval8195 4 ปีที่แล้ว

      @@Csharp-video-tutorialsBlogspot I see! I was confused because I would think the connection String value would come from the database name, not the other way around. Thank you for replying!

  • @deepwoodsengineering3763
    @deepwoodsengineering3763 5 ปีที่แล้ว

    Thank You

  • @rimplechristian361
    @rimplechristian361 2 ปีที่แล้ว

    how to add with DB first approch

  • @nolimitsREAL
    @nolimitsREAL 5 ปีที่แล้ว

    Seems a little bit complicated, just to create a database from the class that you created it.

  • @salmanchowdarym1110
    @salmanchowdarym1110 5 ปีที่แล้ว

    Thanks

  • @MmMm-tg5mq
    @MmMm-tg5mq 5 ปีที่แล้ว

    perfect

  • @prakashbuchade7642
    @prakashbuchade7642 5 ปีที่แล้ว

    How can I use CosmosDb in back end with er core and migration?

  • @lukedodson3441
    @lukedodson3441 5 ปีที่แล้ว

    Can't run a server on a 32bit machine :(

  • @onurfurkan6757
    @onurfurkan6757 4 ปีที่แล้ว

    ScriptHalted ?

  • @ksmith7611
    @ksmith7611 3 ปีที่แล้ว

    Ha figured out why I couldn't use Add-Migration then I came here to tell everyone and found out that I should of looked here first ha ha (or well I am still a noob)

  • @iamanalyst4u
    @iamanalyst4u 5 ปีที่แล้ว

    Package manager consol not available on linux

    • @bulldog2024
      @bulldog2024 5 ปีที่แล้ว +1

      You should be able to use the .net cli in the terminal to accomplish the same thing.

    • @sarozpradhan64
      @sarozpradhan64 4 ปีที่แล้ว

      @@bulldog2024 how?? explain

  • @عمربنعبدالعزيزمحمدصالح-ر1ض

    I have Error:Value cannot be null.
    Parameter name: connectionString

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  5 ปีที่แล้ว +1

      This could have been caused by connection string not being initialised. Can you check if that's not the case. Hope this helps.

    • @charkaouiomar1995
      @charkaouiomar1995 5 ปีที่แล้ว

      stackoverflow.com/questions/40874640/value-cannot-be-null-parameter-name-connectionstring-appsettings-json-in-start

    • @mughalnouman2406
      @mughalnouman2406 4 ปีที่แล้ว

      @@Csharp-video-tutorialsBlogspot I have got the error the build failed

  • @sabeenanarayanan8695
    @sabeenanarayanan8695 5 ปีที่แล้ว

    After Giving the name for the migration it is showing the following error
    (Your target project 'Food' doesn't reference EntityFramework. This package is required for the Entity Framework Core Tools to work. Ensure your target project is correct, install the package, and try again.)
    Can you please tell me how to correct them

    • @UsmanAli-uzi
      @UsmanAli-uzi 5 ปีที่แล้ว

      There could be 2 reasons:
      1- You did not import the Entity framework core package. Refer to video#46 on how to install the package.
      2- Or if you have already installed the package make sure when you open the nuget package manager console window, the correct project is selected. For example if you have 2 or more projects in your solution, one for web, one for data access and you only added the EFcore package to the data access project than make sure data access project is selected in the package manager console window.
      Another option is to select the data access project from the solution explorer before you open the nuget package manager console. That way it will know which project you want to run the migrations on.

  • @opraju
    @opraju 5 ปีที่แล้ว +1

    I am unable to run InitialMigration - I am getting error
    InitialMigration : The term 'InitialMigration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
    was included, verify that the path is correct and try again.
    At line:1 char:1
    + InitialMigration
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (InitialMigration:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    • @whopawan8384
      @whopawan8384 5 ปีที่แล้ว

      IF PACKAGE MANAGER CONSOLE DID NOT FIND SESSION RUN THIS COMMAND ON PM.
      PM> Install-Package Microsoft.EntityFrameworkCore.Tools

    • @anvineet
      @anvineet 4 ปีที่แล้ว

      I also get error after update name:
      PM> Add-Migration
      cmdlet Add-Migration at command pipeline position 1
      Supply values for the following parameters:
      Name: InitialMigrainV
      An error occurred while accessing the IWebHost on class 'Program'. Continuing without the application service provider. Error: Could not parse the JSON file. Error on line number '7': '},
      "AllowedHosts": "*",,'.
      Unable to create an object of type 'AppDbContext'. For the different patterns supported at design time, see go.microsoft.com/fwlink/?linkid=851728

    • @anvineet
      @anvineet 4 ปีที่แล้ว

      Name: InitialMigration
      An error occurred while accessing the IWebHost on class 'Program'. Continuing without the application service provider. Error: Could not parse the JSON file. Error on line number '7': '},
      "AllowedHosts": "*",,'.
      Unable to create an object of type 'AppDbContext'. For the different patterns supported at design time, see go.microsoft.com/fwlink/?linkid=851728

    • @anvineet
      @anvineet 4 ปีที่แล้ว

      To avoid this situation, I create separate project and copy model/ startup project, then again try with "Add -Mirgration", We found this works.

  • @danieltutundziev5894
    @danieltutundziev5894 3 ปีที่แล้ว

    XD

  • @oilha2011
    @oilha2011 4 ปีที่แล้ว

    Perfect, many thanks!

  • @audiofrank6747
    @audiofrank6747 2 ปีที่แล้ว

    Thank you so much!

  • @usamabaloch6178
    @usamabaloch6178 3 ปีที่แล้ว

    I don't see any data in data base in sql server object explorer... where i am wrong can someone tells me?