Create a new solution: API
Add Class Library Api.data
Api.data a new Entity
Copy Code code as follows:
public class Entity
{
private int id;
public int Id
{
get {return ID;}
set {id = value;}
}
private string name;
public string Name
{
get {return name;}
set {name = value;}
}
}
Add Class Library Api.web
Referencing APi.Data.dll
Api.web under
APi.Data.Entity t = new APi.Data.Entity ();
Entity's Gotodefinition
The result:
Copy Code code as follows:
Using System;
Namespace Api.data
{
public class Entity
{
public Entity ();
public int Id {get; set;}
public string Name {get; set;}
}
}
Instead of:
Copy Code code as follows:
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Namespace Api.data
{
public class Entity
{
private int id;
public int Id
{
get {return ID;}
set {id = value;}
}
private string name;
public string Name
{
get {return name;}
set {name = value;}
}
}
}