Inserting Data using EF with MVC4.

I think you can add EF in your project.
Then open model1.edmx or what ever is the name of your file .noe go to it property and change  the property CODE GENERATION STRATEGY to default.
Now delete the 2 xyz.tt file from the model1.edmx.

Firstly add your model on the file like
using PROJECT_NAME.model

den u can add your model entity as

modelentities obj= new modelentities ();
then creating a function in the controller as .

public void addintotable()
{
table1s obj1= new table1s();
obj1.atribute1= value;// adding string value
obj1.attribute2=convert.toint32(value); // adding an int value 
// you can add as many as atttribute you ant to add .

Comments

Popular posts from this blog

Power Apps Choice Column Default Value with connector as Sharepoint

Initializing list and collection in c#.net

Start working with CDS in Power Platform