title: asp.net web api c# interface dataprovider
body: <p>Please look into code, just i found following error when i call interface into dataprovider</p>
  
  <p>error line::: public class UserDataProvider : IUserDataProvider</p>
  
  <p>error text::: 'UserDataProvider' does not implement interface member 'IUserDataProvider.gettabs()'</p>
  
  <p>I will be thankfull of you</p>
  
  <p>Web API code in c#</p>
  
  <p>Interface code:</p>
  
  <pre><code>using System.Collections.Generic;
  using System.Threading.Tasks;
  using WebAPIceoTransaction.Models;
  
  namespace WebAPIceoTransaction.DataProvider
  {
  public interface IUserDataProvider
  {
     Task&lt;IEnumerable&lt;TabMain&gt;&gt; Gettabs();
  
      Task&lt;TabMain&gt; Gettab(int fid);
  
      Task Addtab(TabMain Tab);
  
      Task Updatetab(TabMain Tab);
  
      Task DeleteTab(int fid);
  }
  }
  </code></pre>
  
  <p>DataProvider Code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using Dapper;
  using Microsoft.EntityFrameworkCore;
  using System.Data;
  using System.Data.SqlClient;
  using WebAPIceoTransaction.Models;
  namespace WebAPIceoTransaction.DataProvider
  
  {
  public class UserDataProvider : IUserDataProvider
  {
      private readonly string connectionString = "Server=******;Database=****;Trusted_Connection=True;";
  
      private SqlConnection sqlConnection;
  
      public async Task AddTab(TabMain tabmain)
      {
          using (var sqlConnection = new SqlConnection(connectionString))
          {
              await sqlConnection.OpenAsync();
              var dynamicParameters = new DynamicParameters();
              dynamicParameters.Add("@FName", tabmain.FName);
              dynamicParameters.Add("@FCompany", tabmain.FCompany);
              dynamicParameters.Add("@FDate", tabmain.FDate);
              dynamicParameters.Add("@FAmount", tabmain.FAmount);
  
              dynamicParameters.Add("@FPaid", tabmain.FPaid);
              dynamicParameters.Add("@FTransferType", tabmain.FTransferType);
              dynamicParameters.Add("@FChequeNo", tabmain.FChequeNo);
              dynamicParameters.Add("@FBank", tabmain.FBank);
              dynamicParameters.Add("@FAccountNo", tabmain.FAccountNo);
              dynamicParameters.Add("@Purpose", tabmain.Purpose);
  
  
              await sqlConnection.ExecuteAsync(
                  "spAddTab",
                  dynamicParameters,
                  commandType: CommandType.StoredProcedure);
          }
      }
  
      public async Task DeleteTab(int fid)
      {
          using (var sqlConnection = new SqlConnection(connectionString))
          {
              await sqlConnection.OpenAsync();
              var dynamicParameters = new DynamicParameters();
              dynamicParameters.Add("@Fid", fid);
              await sqlConnection.ExecuteAsync(
                  "spDeleteUser",
                  dynamicParameters,
                  commandType: CommandType.StoredProcedure);
          }
      }
  
      public async Task&lt;TabMain&gt; GetTab(int fid)
      {
          using (var sqlConnection = new SqlConnection(connectionString))
          {
              await sqlConnection.OpenAsync();
              var dynamicParameters = new DynamicParameters();
              dynamicParameters.Add("@fid", fid);
              return await sqlConnection.QuerySingleOrDefaultAsync&lt;TabMain&gt;(
                  "spGetTab",
                  dynamicParameters,
                  commandType: CommandType.StoredProcedure);
          }
      }
  
      public async Task&lt;IEnumerable&lt;TabMain&gt;&gt; GetTabs()
      {
          using (var sqlConnection = new SqlConnection(connectionString))
          {
              await sqlConnection.OpenAsync();
              return await sqlConnection.QueryAsync&lt;TabMain&gt;(
                  "spGetTabs",
                  null,
                  commandType: CommandType.StoredProcedure);
          }
      }
  
      public async Task UpdateTab(TabMain tabmain)
      {
          using (var sqlConnection = new SqlConnection(connectionString))
          {
              await sqlConnection.OpenAsync();
              var dynamicParameters = new DynamicParameters();
              dynamicParameters.Add("@FName", tabmain.FName);
              dynamicParameters.Add("@FCompany", tabmain.FCompany);
              dynamicParameters.Add("@FDate", tabmain.FDate);
              dynamicParameters.Add("@FAmount", tabmain.FAmount);
  
              dynamicParameters.Add("@FPaid", tabmain.FPaid);
              dynamicParameters.Add("@FTransferType", tabmain.FTransferType);
              dynamicParameters.Add("@FChequeNo", tabmain.FChequeNo);
              dynamicParameters.Add("@FBank", tabmain.FBank);
              dynamicParameters.Add("@FAccountNo", tabmain.FAccountNo);
              dynamicParameters.Add("@Purpose", tabmain.Purpose);
              await sqlConnection.ExecuteAsync(
                  "spUpdateTab",
                  dynamicParameters,
                  commandType: CommandType.StoredProcedure);
          }
      }
  
  }
  </code></pre>
  
  <p>}</p>