Good day,
Is it possible to create a simple entity framework system withou using DAL? or maybe context? direct connection?
let say, i want to extract all my record in gridview.
//assume that this is my formload
protected form_load()
{
if(!isPOstBack)
{
getAllRecord(); //mymethod to call the data taht will be place on the gridview
}
}
public void getAllRecord() //this is my method
{
ContactsEntities cont = new ContactEntities();
gvContacts.DataSource = cont.getContacts();
gvContacs.DataBind();
}
my entity class is located on the other class module
let say..
public class ContactEntities
{
public int _id;
public string name;
//my properties
public int ID
{ get ; set ;}
public string Name
{ get; set; }
}
i lost when generating the getContacts() just to insert my connection and my query.
i am not familiar with the linq and disconnected layer. i am just a beginner programmer that want to learn basic of entity framework.
I hope that you can help me regarding this