Last post Apr 08, 2021 06:07 PM by Mikesdotnetting
Apr 08, 2021 11:52 AM|WDAdesigns|LINK
Really sorry complete novice looking at Visual studio for the first time and seem to be chasing my tail, im using a mac and cant seem to find any good literature or help.
So my situation..
I have a website that consists of guided help with a click through navigation (for corporate use)
we are looking to track the usage of these guides so looking to setup a ASP.net application on the server that will write to a database when ever certain points are reached within the guide.
From what I can gather ASP.Net Core MVC is the route I need to go down
ive installed Entity Framework Core SqlServer & Tools,
Ive importated my webpage into the relevant folder so when I run the debug my page is displayed
Server explorer doesnt exist on the mac build and I have no clue on how to set up a database
once the database is setup im sure with the material available ill be able to work out getting my page to write to it
any help would be massively appreciated and im really sorry if this is childs play stuff
Thanks in advanced
Apr 08, 2021 12:59 PM|Mikesdotnetting|LINK
Entity Framework Core works with loads of different types of database, many of them cross platform. Probably the easiest one for you to use is SQLite, a file based system that requires zero configuration. It's already installed as part of macOS, I believe.
You will need the Microsoft.EntityFrameworkCore.Sqlite package into your app instead of the SqlServer package. When you run your first migration, the database file is created automatically.
Apr 08, 2021 02:33 PM|bruce (sqlwork.com)|LINK
I also use a Mac for my development. On a Mac you use azure data studio
if you want to run a local copy of Sqlserver, you just use the docker image
if your Mac is a m1, use azure sql edge docker image
Note: if you connect to a Sqlserver using windows authentication, then you must enable Kerberos on the Sqlserver instance. You use key chain ticket support to login.
Apr 08, 2021 02:51 PM|WDAdesigns|LINK
Thank you Mikesdotnetting
that certainly pointed me in the right direction and youve mentioned something that ive not yet come across and thats migration,
it seems like it should be simple as in running a snippet of code in a console
PM> Add-Migration Initial
problem being I dont have a Package Manager Console, I have a package console but doesnt allow for text entry?
again any help is a god send
Apr 08, 2021 03:38 PM|bruce (sqlwork.com)|LINK
I typically use visual studio code (which also has sqlserver support) but with visual studio, right click on the project:
tools->open in terminal window
then follow the docs for the dotnet cli:
as suggested SQLLite is installed on all macs. but I use sqlserver.
Apr 08, 2021 06:07 PM|Mikesdotnetting|LINK
You can use the Terminal to execute CLI commands: