Dapper Extensions - Methods not accessible by MySqlConnection

Ismael123

Member
Joined
May 13, 2016
Messages
14
Programming Experience
1-3

Hi I installed Dapper and Dapper extensions from the NuGet package Manager but I'm not able to use methods like Insert, Delete, etc... Is there something amiss in my project.
I have a model

using Dapper;
namespace TBT
.Models
{
publicclassCategory
{
publicintId{ get;set;}
publicintCategoryType{ get;set;}
publicstringCategoryName{ get;set;}

publicintSave()
{
using
(MySqlConnection cn =newMySqlConnection("Server=localhost;Database=tubitet;Uid=root;Pwd=;"))
{
cn
.Open();
cn
.Insert(this);
//cn.Delete(this);
cn
.Close();
}
returnthis.Id;
}



 
Back
Top Bottom