When I am running this code, one is the interface other is the class. I am getting this error.
CS0051 C# Inconsistent accessibility: parameter type 'user' is less accessible than method 'cuserepository.Insert user'
This is the code for class cuserrepository:
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;
namespace signup_form
{
public class cuserrepository : userrepository
{
public async Task<bool> Insert(user user)
{
using (IDbConnection db = new SqlConnection(Apphelper.ConnectionString))
{
var result = await db.ExecuteAsync(signup_form.Properties.Resources.InsertUser, new { username = user.username, fullname = user.Fullname, email = user.Email, password = user.Password });
return result > 0;
}
}
}
}
This is the code for the interface:
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace signup_form
{
interface userrepository
{
Task<bool> Insert(user user);
}
}
Can anyone tell me what is the problem?