Home > Net >  Sexy small white, online for help
Sexy small white, online for help

Time:10-12

1. In the Sqlite VS2017 for two tables t_a and t_b create a view the view1
2. Generate Ado model t_a tables and views, t_b, the view1
3. Add view in the controller methods index, model choice the view1
Generated view does not automatically generate the view1 model in the field of
This problem has a solution?

CodePudding user response:



CodePudding user response:

Didn't understand what you mean

CodePudding user response:

The
reference 2 floor XBodhi. Response:
didn't understand what you mean

To see the view in the 1/f, there is no automatic generation in the diagram below the view1 fields:

CodePudding user response:

You use the sqlite ado model built?

CodePudding user response:

The item and modelItem yao's necessary to write, so you directly @ item. Attributes can,

CodePudding user response:

 public class Test 
{
Public string Name {get; The set; }
}

Public class HomeController: Controller
{
Public IActionResult Index ()
{
Return the View (new Test () {Name="Joe -"});
}
}









Like this is ok, the View can take the model can also be put into viewtag,

CodePudding user response:

reference 5 floor XBodhi. Response:
item and modelItem it's necessary to write it, so you directly @ item. Attributes can,

You used to create a view automatically generated field?

CodePudding user response:

Create a view automatically generated field, the premise is you have to have a model

Then check the create a strongly typed view (strong typed view) to choose your model class,

The model can use ef db first generated from a database table structure, but the default can only support the SQL server database, a generator of the third party to support other

Instead of the so-called generation field directly,

CodePudding user response:

New {} and dynamic is not supported,
  • Related