using AppModel.DTO;
using AppModel.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
namespace AppRepository
{
public class MyRepository : IMyRepository
{
private myEntity context;
public int Add(Data data)
{
using (context = new myEntity())
{
DBTable dbTable = new DBTable();
dbTable.MyID = data.MyID;
dbTable.MyFirstName = data.MyFirstName;
dbTable.MyLastName = data.MyLastName;
dbTable.MyDOB = data.MyDOB;
context.DBTable.Add(dbTable);
return context.SaveChanges();
}
}
}
}