when i updated my database i got this error: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) how i can fix that pleaaase, help me.
Thank you, Joe! This is very helpful. I'm pretty new to ASP.NET Core and I'm learning it right now in my school. We're learning the code-first approach for MVC pattern. How do I make a db from scratch using Visual Studio 2022 in macOS? In your video, I know you already have one, but what if I want to start coding my models and DbContext first and then creating a db for that in my localhost?
Hi Alesson, thank you! In this case, make sure you have EFCore CLI installed on your Mac. Then check out this post from Microsoft themselves, to add an initial for your code-first approach: docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
Hello bro I am from the video of jet brains, I got confused, I was watching the jetbrains tutorial when I need to make the connection with visual studio 😂 I am using a proyect Created on Mac, do I need to change it to a Windows one?
Hey thank you for this tutorial! In case you run your SQL server in a Virtual Machine there is a chance the connection is refused because of The certificate chain was issued by an authority that is not trusted. You can solve this problem by adding Encrypt=False; to your connection string.
Thank you! I don’t, but there are already other resources that would help you with your question. My intention with this tutorial is only to help fix the very issue of no SQL Server support on macOS 😄
Hey there,keep up the great work in your channel. I have only a general enquiry as a newbie sql learner. Could i channel shopify live data into an sql application?(This should be an application developed for a company of 50 employees mainly for the sake of generating reports and analytics)) Is this an easy process to undertake as a sql beginner? What should i keep in mind and what are the tools or softwares that i should work with right from the beginning. For notice, I made my mind to work with microsoft sql server, also our company has a dedicated server. Thanks for taking care of my enquiry
@@danbarry3678 I don't know the best way, it depends on your needs. I only know good options are using Parallels, VMWare, or Virtual Box. You can try out and see for yourself Dan! Good luck! 👍
Man you are awesome. I just have one question. When I try to do 'dotnet ef database update', I got this error: Could not execute because the specified command or file was not found. Possible reasons for this include: * You misspelled a built-in dotnet command. * You intended to execute a .NET program, but dotnet-ef does not exist. * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. Do you know or someone what is the problem actually? Thank you to all!
Thankyou so much for the video man, you are a saviour, just one question do we need SSMS for M1 chip to manage? I'm new to both mac and DotNet so I dont know, if anyone know please help me.
Sorry what is SSMS? Correction: Okay I think you can see by asking what SSMS is, it means I probably didn't know what it is, didn't install it and still, this solution works on my M1. Hence I guess the docker image of `azure-sql-edge` is enough (given your architecture is M1). Plus, when I download SSMS, I only can download the .exe installer 🤷🏻♂️ In case you really wanna manage and manipulate your database, hopefully Azure Data Studio is enough, though as of this moment is not M1 native
Ngoài azure-sql-edge, còn cách nào khác ko bạn? Mình cần cài SQL Server cho con M1 nhưng mà azure-sql-edge thì thiếu nhiều features mình cần cho project của mình quá. Mình có paid version of Parallel (windows 11) if that helps.
It depends on your project, but here are the common ones I see in Murach's sample projects: Microsoft.EntityFrameworkCore.Design Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.Tools Microsoft.VisualStudio.Web.CodeGeneration.Design
@@moshikof7778 The source code is available on Murach’s website for ASP.NET CORE MVC, under the Free downloads tab. You can download the Windows version of it, so that projects use SQL Server instead of SQLite. For an easier access, here's one from my Google Drive: tinyurl.com/bdz2t3j7
@@rungxanh2901 thanks, but i need guides for visual studio and sql edge for mac, i was confused because there not a lot of guides specificly for mac m1's
1. You gotta configure your database context and add migrations yourself. That’s something beyond the scope of this video. 2. Dotnet 6.0 moved away from having a Startup.cs file. Program.cs takes over
"ConnectionStrings": { "DefaultConnection": "DataSource=app.db;Cache=Shared" } this is in my appsettings.json , where should i put the new connection string then? replacing this?
The source code is available on Murach’s website for ASP.NET CORE MVC, under the Free downloads tab. You can download the Windows version of it, so that projects use SQL Server instead of SQLite
@@rungxanh2901 Hey, thanks for this sharing. At this time, I can't access this link so can you provide another download link please? Have a good day you guys!
You can do that of course. Running Windows as a VM on Parallels, with Visual Studio + SQL Server built-in. Just keep in mind the overall performance might take a huge hit
You can go to Murach's website, search for "ASP.NET Core" book. Under their "Downloads" tab, there's link to download Windows/Mac versions of their source codes
Hi. Sorry this video is a tutorial for a workaround for SQL Server support on Mac, not a tutorial on ASP.NET Core migrations. I'm sure you can find plenty videos on that topic on UA-cam instead.
I get this when I in the step 5 with Intel Mac 🤔 docker: invalid reference format: repository name must be lowercase. Do you have any idea how to solve this?
Yes the error is quite self-explanatory. I guess you can double check the part after "docker run -d -name" command, where the name is, is lowercase or not? If not then make it lowercase
@@AL-bt1px & anyone else with this issue try: docker run -d --name ms-sql-server -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=newPASSWORD123$' -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest Note the extra -e to separate --name from 'ACCEPT . . .' and change in the image location(?) to match the necessary pull command as well (I.e. docker pull mcr.microsoft.com/mssql/server:2022-latest )
Hey, I tried to change in appsettings.json. Since my file is default one, I get default connection under connectionstrings. When I changed the default connection line in code to the one you provided, I get an error that Connection string keyword 'server; is not supported.
@@rungxanh2901 This was my code "ConnectionStrings": { //"DefaultConnection": "DataSource=app.db;Cache=Shared", "DefaultConnection": "Server=localhost;Database=leavemanagementnet6;User=leavemanagement;Password=leavemanagement;" },
Then you can consider adding your first migration to the project, from the Terminal console. `dotnet ef migrations add ` P/s: the current folder that the Terminal is pointing to should be in the solution folder More info here docs.microsoft.com/en-us/ef/core/cli/dotnet
mình add rồi nhung đến lúc sudo updata database nó báo là There is already an object named 'DanhMuc' in the database. bạn có khi nào gặp trường hợp này không. chỉ mình fix với mình có tìm nhiều mà chưa fix dc
Chào bạn. Lỗi này mình cũng đã gặp, có hướng dẫn từ phút 13:00 đấy bằng cách tải Azure Data Studio và thực hiện tiếp theo tutorial. Một cách chữa nhanh bạn có thể thử là trong file appsettings.json, ở connectionString, bạn đổi tên database khác đi. Ví dụ: thay vì Server=localhost;Database=MyDatabase;User=sa;Password=Docker@123; => bạn chữa thành Server=localhost;Database=MyDB;User=sa;Password=Docker@123; Rồi chạy lại lệnh `dotnet ef database update` 👍🏻 Chúc may mắn nhe
I'm no expert, but what I'm seeing in your connection string is a weird "*" for password. Try replacing that asterisk with another password that: 1. is the same with the password you used to initialize your Docker image, and 2. satisfies the mentioned password requirements.
hi can you create a video on how to connect vs code to ms sql server on M1 Mac using python? seems like unixodbc is not fully supported for M1 yet, which is causing pyodbc not usable
You are literally a life saver! Thanks from the UK!!!
Thank you Tom! I intended to keep this tutorial for myself initially haha, I'm happy I did otherwise
Also to answer your original question, the source code is available on Murach’s website for ASP.NET CORE MVC, under the Free downloads tab
when i updated my database i got this error:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
how i can fix that pleaaase, help me.
Thank you, Joe! This is very helpful.
I'm pretty new to ASP.NET Core and I'm learning it right now in my school. We're learning the code-first approach for MVC pattern. How do I make a db from scratch using Visual Studio 2022 in macOS? In your video, I know you already have one, but what if I want to start coding my models and DbContext first and then creating a db for that in my localhost?
Hi Alesson, thank you!
In this case, make sure you have EFCore CLI installed on your Mac. Then check out this post from Microsoft themselves, to add an initial for your code-first approach:
docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
Thank you so much. You have solved my issue :D
Cheers Ryan 🍻
I have an M1 MacBook Air and it works for me. Thank you
I'm using the very same model 😄
Hey, I am facing Connection string keyword 'server' is not supported.
Did you also face the same?
Hello bro I am from the video of jet brains, I got confused, I was watching the jetbrains tutorial when I need to make the connection with visual studio 😂
I am using a proyect Created on Mac, do I need to change it to a Windows one?
Hey thank you for this tutorial! In case you run your SQL server in a Virtual Machine there is a chance the connection is refused because of The certificate chain was issued by an authority that is not trusted. You can solve this problem by adding Encrypt=False; to your connection string.
Thank you! Yeah there's always new things to learn from 🤝
so beautiful i can cry.... thank you 🙏🏻
Great to hear it is helpful to you Noor!
Very good video.
Do you have like a step by step of creating the models views and controller code for this project?
Thank you! I don’t, but there are already other resources that would help you with your question.
My intention with this tutorial is only to help fix the very issue of no SQL Server support on macOS 😄
Thank you so much, is very useful any information related with the difference of configurations between windows and mac
Definitely, thank you for your appreciation ♥
Thank you for this tutorial Joe
Happy to share 🤝
Hey there,keep up the great work in your channel.
I have only a general enquiry as a newbie sql learner.
Could i channel shopify live data into an sql application?(This should be an application developed for a company of 50 employees mainly for the sake of generating reports and analytics))
Is this an easy process to undertake as a sql beginner? What should i keep in mind
and what are the tools or softwares that i should work with right from the beginning.
For notice, I made my mind to work with microsoft sql server, also our company has a dedicated server.
Thanks for taking care of my enquiry
Hi Hasan, thank you for the kind words! 🫡
Unfortunately I don't think I have an informed answer for you 😅
Omg god thank you so much you literally saved me! I owe you one.
Thank you, have a nice day!
Thank you for the great tutorial
I got your back man! Really appreciate your view 🙏🏻
kudos! nice and smooth :)
thanks for your video, only if you can. and dare, will a tutorial with identity scafolding be possible
Thank you Andrés. That’s a possibility 😄 I’m still learning ASP.NET Core at the moment haha 🙂
you are a TITAN! thank you
Thank you Roberto 👋🏻
I have a imac m1 24 inch(2021), Can i develop win apps on my mac? IS there any way?
Easiest way I see is to run Windows on a VM. Otherwise, it’s a “depends” answer 😅
@@rungxanh2901 What's the best way to run Windows on a VM? I see several options, but I am not sure which way to go.
@@danbarry3678 I don't know the best way, it depends on your needs. I only know good options are using Parallels, VMWare, or Virtual Box. You can try out and see for yourself Dan! Good luck! 👍
He is the best !
Thank you, great to know my little tip helped!
I love you... thanks a lot. would you make a tutorial about power bi?
Haha thanks! What's power bi?
@@rungxanh2901 power bi desktop on mac m1
I don’t have an idea what PowerBI is, but if I managed to understand it, I’d definitely make a tutorial 😄
Man you are awesome. I just have one question. When I try to do 'dotnet ef database update', I got this error:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-ef does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Do you know or someone what is the problem actually? Thank you to all!
I’m clueless, but are you executing the command at your project folder or solution folder? Sometimes that matters
@@rungxanh2901 Hello bro. No no, not solution folder. I was trying with project folder.
Thankyou so much for the video man, you are a saviour, just one question do we need SSMS for M1 chip to manage? I'm new to both mac and DotNet so I dont know, if anyone know please help me.
Sorry what is SSMS?
Correction: Okay I think you can see by asking what SSMS is, it means I probably didn't know what it is, didn't install it and still, this solution works on my M1. Hence I guess the docker image of `azure-sql-edge` is enough (given your architecture is M1). Plus, when I download SSMS, I only can download the .exe installer 🤷🏻♂️
In case you really wanna manage and manipulate your database, hopefully Azure Data Studio is enough, though as of this moment is not M1 native
I answered in the comment above 👍🏻
@@rungxanh2901 thankyou so much 🙌🏻
Good luck 👌🏻
so in order to connect to a sql container on mac (i have m1 mac mini),
in connection string, when "server", i need to simply write "localhost" ?
Yes, and remember to have docker and the container on running mode too 👍🏻
@@rungxanh2901 thanks, that was the part i couldnt figure it out
@@moshikof7778 No problem. I reminded it at 7:27
Lỡ mua mac rồi muốn học .net phải mua máy windows lại à a :(
Hoặc em dùng máy ảo Windows để chạy Visual Studio, hoặc em chạy Docker image như trong clip tutorial. Dùng Mac lợi đôi đường chứ, sao lại "lỡ" 😂
Ngoài azure-sql-edge, còn cách nào khác ko bạn? Mình cần cài SQL Server cho con M1 nhưng mà azure-sql-edge thì thiếu nhiều features mình cần cho project của mình quá.
Mình có paid version of Parallel (windows 11) if that helps.
Cá nhân mình chỉ biết cách này nên share cho mọi người thôi bạn. Nếu project cần tính năng đặc thù thì chắc dùng Windows 11 luôn cho nhanh chóng
Which form should I use If I create new project?
Depends on your intention, but for an ASP.NET Core project, it's usually "ASP.NET Core (Model-View-Controller)"
@@rungxanh2901 Thank you so much.Your videos are the best
can you please tell what NuGet packages did you used in visual studio in order to connect to sql edge from dotnet ?
It depends on your project, but here are the common ones I see in Murach's sample projects:
Microsoft.EntityFrameworkCore.Design
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools
Microsoft.VisualStudio.Web.CodeGeneration.Design
@@rungxanh2901 thanks, any chance you can direct me to the docs you've used to figure it out ?
@@moshikof7778 The source code is available on Murach’s website for ASP.NET CORE MVC, under the Free downloads tab. You can download the Windows version of it, so that projects use SQL Server instead of SQLite.
For an easier access, here's one from my Google Drive: tinyurl.com/bdz2t3j7
@@rungxanh2901 thanks, but i need guides for visual studio and sql edge for mac, i was confused because there not a lot of guides specificly for mac m1's
Which part specifically that you need help with? I think I answered your question about NuGet already no?
when i start the template web with mvc, but why there isn't migration folder, startup.cs file ??
1. You gotta configure your database context and add migrations yourself. That’s something beyond the scope of this video.
2. Dotnet 6.0 moved away from having a Startup.cs file. Program.cs takes over
"ConnectionStrings": {
"DefaultConnection": "DataSource=app.db;Cache=Shared"
}
this is in my appsettings.json , where should i put the new connection string then? replacing this?
Yes, try replacing it
If you can share the project file along with this , it may be very helpful.
The source code is available on Murach’s website for ASP.NET CORE MVC, under the Free downloads tab. You can download the Windows version of it, so that projects use SQL Server instead of SQLite
@@rungxanh2901 I couldn't find it can you please provide the download link?
You can try this: tinyurl.com/bdz2t3j7
@@rungxanh2901 Hey, thanks for this sharing. At this time, I can't access this link so can you provide another download link please? Have a good day you guys!
You are the best
Thank you Coco!
Can I install SQL Server on a Windows 11 on a VM on parallels on a MacBook Air with intel i5? Thanks 🙏
You can do that of course. Running Windows as a VM on Parallels, with Visual Studio + SQL Server built-in. Just keep in mind the overall performance might take a huge hit
@@rungxanh2901 thanks
thank you
can I run MS SQL 2017 on M1?
one more..
if I upload a 2017 backup to azure SQL edge, will the database be migrated?
Hi Juan, fair question but I don’t have the knowledge to answer it 😅
@@rungxanh2901 tks man
where can I download the textbook? @6:33
I can only send you the link to the book.
www.murach.com/shop/murach-s-asp-net-core-mvc-detail
hello, how can I create the windows version of de code like the version you opened in the minute 6:40
You can go to Murach's website, search for "ASP.NET Core" book. Under their "Downloads" tab, there's link to download Windows/Mac versions of their source codes
@@rungxanh2901 thanks you bro
what can I do If I don't have the folder "Migrations"
Hi. Sorry this video is a tutorial for a workaround for SQL Server support on Mac, not a tutorial on ASP.NET Core migrations.
I'm sure you can find plenty videos on that topic on UA-cam instead.
@@rungxanh2901 I was wondering because if I don't have them, can I continue with the tutorial?
I get this when I in the step 5 with Intel Mac 🤔
docker: invalid reference format: repository name must be lowercase.
Do you have any idea how to solve this?
Yes the error is quite self-explanatory. I guess you can double check the part after "docker run -d -name" command, where the name is, is lowercase or not?
If not then make it lowercase
@@rungxanh2901 I have it on lowercase all the times I tried 🙄
Would you mind leaving a link to your screenshot of the Terminal app on that error, with the command too?
@@rungxanh2901 Every time I try to share you a screenshot, my comment disappears.
@@AL-bt1px & anyone else with this issue try:
docker run -d --name ms-sql-server -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=newPASSWORD123$' -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest
Note the extra -e to separate --name from 'ACCEPT . . .' and change in the image location(?) to match the necessary pull command as well (I.e. docker pull mcr.microsoft.com/mssql/server:2022-latest )
Hey,
I tried to change in appsettings.json. Since my file is default one, I get default connection under connectionstrings. When I changed the default connection line in code to the one you provided, I get an error that Connection string keyword 'server; is not supported.
Hey Jerry, does your connection string start with a 'Server' with a capital 'S' or lowercase 's'? That may be the case?
@@rungxanh2901 This was my code
"ConnectionStrings": {
//"DefaultConnection": "DataSource=app.db;Cache=Shared",
"DefaultConnection": "Server=localhost;Database=leavemanagementnet6;User=leavemanagement;Password=leavemanagement;"
},
@@rungxanh2901 Thanks. Sorry for the inconvenience
I did not install botnet ef tools
@@jerrycaleb8035 Sounds fair. Good that you found it out 🤝
@@rungxanh2901 Hey, I am facing the same issue again. How can I share the code with you?
Is it possible to download sQL in mac m1
Yes, you have to run this on docker and use azure data studio to manage the database.
@@mrmone5068 do you now how to insert my data base in visual studio after using azure data studio?
@@Hamdi_films sadly that is not possible for mac atm you will have to use azure data studio to view your database tables
hii , i am not getting migrations folder what should do?
Then you can consider adding your first migration to the project, from the Terminal console.
`dotnet ef migrations add `
P/s: the current folder that the Terminal is pointing to should be in the solution folder
More info here docs.microsoft.com/en-us/ef/core/cli/dotnet
@@rungxanh2901 thank you :-)
@@bhargavbodipalli2433 You're welcome, hopefully it helps 😊
Can I do all this things in COnsole App?
Can try and see for yourself. This video is just for tips getting SQL Server to work with an ASP.NET Core project
mình add rồi nhung đến lúc sudo updata database nó báo là There is already an object named 'DanhMuc' in the database. bạn có khi nào gặp trường hợp này không. chỉ mình fix với mình có tìm nhiều mà chưa fix dc
Chào bạn. Lỗi này mình cũng đã gặp, có hướng dẫn từ phút 13:00 đấy bằng cách tải Azure Data Studio và thực hiện tiếp theo tutorial.
Một cách chữa nhanh bạn có thể thử là trong file appsettings.json, ở connectionString, bạn đổi tên database khác đi.
Ví dụ: thay vì Server=localhost;Database=MyDatabase;User=sa;Password=Docker@123;
=> bạn chữa thành
Server=localhost;Database=MyDB;User=sa;Password=Docker@123;
Rồi chạy lại lệnh `dotnet ef database update` 👍🏻
Chúc may mắn nhe
cảm ơn bạn nhiều nhé👍
Ko có chi Tú
Hey
How can i open webform in mac ?
This I don’t know a solution yet, sorry!
It says that connection string keyword 'server' is not supported. How can I solve it?
I guess “server” wasn’t capitalized?
@@rungxanh2901 I get the same error regardless
Can you provide a link to screenshot with the error and your connection string?
I'm no expert, but what I'm seeing in your connection string is a weird "*" for password. Try replacing that asterisk with another password that: 1. is the same with the password you used to initialize your Docker image, and 2. satisfies the mentioned password requirements.
Fixed, my program.cs had UseSqllite instead of UseSqlServer
Industry Connect?
Sorry, I don’t get what you meant?
Người Việt Nam giỏi thật
Can you give us source code for DataContext ?
You can browse Murach Books' website, ASP.NET Core section to download the source code
hi can you create a video on how to connect vs code to ms sql server on M1 Mac using python? seems like unixodbc is not fully supported for M1 yet, which is causing pyodbc not usable