Entity framework 如何使用Aspnet webapi保存双工列表

Entity framework 如何使用Aspnet webapi保存双工列表,entity-framework,asp.net-web-api,Entity Framework,Asp.net Web Api,我需要从android客户端保存一个从a点到B点的位置列表,我正在使用EntityFramework和SQL Server的WebApi。在android项目中,我使用类LatLng并列出这些位置,因此我考虑将对象LatLng转换为JSON并另存为字符串,这将是一种很好的存储方式 public List<LatLng> buildJSONRoute(String jsonRoutes) throws JSONException {... latLngs = buildJSONRou

我需要从android客户端保存一个从a点到B点的位置列表,我正在使用EntityFramework和SQL Server的WebApi。在android项目中,我使用类
LatLng
并列出这些位置,因此我考虑将对象LatLng转换为JSON并另存为字符串,这将是一种很好的存储方式

public List<LatLng> buildJSONRoute(String jsonRoutes) throws JSONException {...

latLngs = buildJSONRoute(s);
String routes = new Gson().toJson(latLngs);
public List buildJSONRoute(字符串jsonRoutes)抛出JSONException{。。。
latLngs=buildJSONRoute(s);
字符串routes=new Gson().toJson(latLngs);

存储在哪里?出于什么原因?多长时间?您将如何使用它?您需要转换数据吗?您需要搜索数据吗?…使用WebApi存储在SQL Server中。多长时间?永久性。用户将能够获得此列表并使用android地图绘制路线。我需要解析到
LatLng
类才能draw!该列表的查询将返回另一个用户数据,而不是列表本身。我只是试图避免使用Google Api路由,因为我已经有了位置列表,第二次需要再次请求时,我只是列出它们并进行解析。