internal static Addr MapToAddr(FindEndPoint point) { if (point == null || point.FoundGeo == null) return null; Addr ret = new Addr(); ret.TrueCode = point.FoundGeo.Code; ret.HouseFlat = (point.Site ?? new Location()).Presentation; return ret; }
public static void Save(Addr a) { DbHelper.CreateCommand("update tblAddress set TrueCode=@tcode, HouseFlat=@hf where Id=@id") .AddParameter("@tcode", a.TrueCode) .AddParameter("@hf", a.HouseFlat) .AddParameter("@id", a.AddrId) .Execute(); }