public Point Location { get; set; }
برای اضافه کردن geoghrphy با استفاده از ef core 3 ابتدا لازمه کتابخانه زیر اضافه شه
Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite
services.AddDbContext(c => c.UseSqlServer(Configuration.GetValue("ConnectionString") ,x => x.UseNetTopologySuite()));
var currentLocation = new Point(dto.Lat, dto.Lng) { SRID = 4326 }; queryRow = YOURCONTEXT.YOURTABLE.find(id); queryRow.Distance = queryRow.Location.Distance(currentLocation)
تا کنون نظری داده نشده است .
اولین کسی باشید که دیدگاه خود را ثبت می کند .
لطفا منتظر بمانید...