あなたが行くなら
http://nerddinner.codeplex.com/SourceControl/changeset/view/b1a032d1532b
MVC4 バージョンを取得します。それを実行します。ディナーを開催します。[作成] をクリックすると、常にこのエラーが発生します (スクリーンショット)
これは、私が学習を支援するために使用したい主要なリファレンス アプリの 1 つです。
スクリーンショットが機能したかどうかはわかりませんが、エラーは次のとおりです。
LatLongStr のこのコード部分の IndexOutOfRangeException
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
var valueProviderResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
if (valueProviderResult != null)
{
string[] latLongStr = valueProviderResult.AttemptedValue.Split(',');
string point = string.Format("POINT ({0} {1})", latLongStr[1], latLongStr[0]);
//4326 format puts LONGITUDE first then LATITUDE
DbGeography result = DbGeography.FromText(point, 4326);
return result;
}
return null;
}