var currentAddress = bingRepository.ToDatabaseAddress(model.CurrentAddress, LocationTypes.Current, out errorString);
//If currentAddress is null and error message value was found, set error in errorstring.then add below lines
if (!string.IsNullOrEmpty(errorString))
{
string wrongAddressErrorString = errorString;
ModelStateDictionary modelState = new ModelStateDictionary();
modelState.AddModelError(string.Empty, string.IsNullOrWhiteSpace(wrongAddressErrorString) ? "Not update error" : wrongAddressErrorString);
return false;
}
Very good explanation.
ReplyDeleteASP.Net MVC Training
Online MVC Training
Online MVC Training from India
MVC Training in Chennai