0

I am new to .Net Core and I'd like to know scaffold EF support sql view like it supports sql table in .Net Core 6? If it supports which command will do? For tables,Scaffold-DbContext and is it same command?

Thank you very much in advance!

1
  • you can refer to this link. Commented Mar 24, 2022 at 8:15

2 Answers 2

1

Scaffold-DbContext can scaffold both tables and views, Here is the Example:-

Scaffold-DbContext "Server=10.10.10.123;Database=Testdb; user id=sa; password=Sa1234" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context TestDBContext -Tables v_employee

Sign up to request clarification or add additional context in comments.

Comments

0

Scaffold-DbContext will scaffold both tables and views

1 Comment

Example please?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.