Abstracting dataRepresentation class
I have a class which represents data elements and I need to hide it- I have to use interface  and pass only objects to the controller).
Here is the code what I mean.

 public class APItem 
    {
        
       

        public AccessPointItem() { }
        public string apID { get; set; }
        public string Name { get; set; }
       
        public int Type { get; set; }

        public string Site { get; set; }
 void Details(string id);
        void list(string ApID);

        
    }
/////////////////////////////////////////////////////////////////////
now I don't want to use this class, I rather need to use an interface and access the properties of this class. For that I have an interface like this (almost similar to the class )


public  interface IAPItem
    {

        //Ap  properties
        string apID { get; set; }
        string Type { get; set; }
        string Name { get; set; }
        string Site { get; set; }
        string Solution { get; set;}
        void Details(string id);
        void list(string ApID);
    }



So that when ever I save to save APitem in to a database/tablestorge inthis case/ I simply fill the datamodel and save it.

now I just dont have a clue how to do it
Abstracting dataRepresentation class
===

I have a class which represents data elements and I need to hide it- I have to use interface  and pass only objects to the controller).
Here is the code what I mean.

 public class APItem 
    {
        
       

        public AccessPointItem() { }
        public string apID { get; set; }
        public string Name { get; set; }
       
        public int Type { get; set; }

        public string Site { get; set; }
 void Details(string id);
        void list(string ApID);

        
    }
/////////////////////////////////////////////////////////////////////
now I don't want to use this class, I rather need to use an interface and access the properties of this class. For that I have an interface like this (almost similar to the class )


public  interface IAPItem
    {

        //Ap  properties
        string apID { get; set; }
        string Type { get; set; }
        string Name { get; set; }
        string Site { get; set; }
        string Solution { get; set;}
        void Details(string id);
        void list(string ApID);
    }



So that when ever I save to save APitem in to a database/tablestorge inthis case/ I simply fill the datamodel and save it.

now I just dont have a clue how to do it