コード例 #1
0
        public static DbGeography ToDbGeographiesMultiPoint(this IEnumerable <Position> positions)
        {
            var points = positions.Aggregate("MULTIPOINT(", (current, position) => current + (position + ","));

            points  = points.Remove(points.Length - 1);
            points += ")";
            return(DbGeography.MultiPointFromText(points, 4326));
        }
コード例 #2
0
        public static DbGeography CreateDbMultiPoint(IPoint[] points)
        {
            var distinctPoints = points.Distinct(new PointEqualityComparer());
            var pointsString   = String.Join(", ", distinctPoints.Select(p => string.Format(CultureInfo.InvariantCulture,
                                                                                            "({0} {1})", p.Longitude, p.Latitude)));


            return(DbGeography.MultiPointFromText(
                       string.Format(CultureInfo.InvariantCulture, "MULTIPOINT({0})", pointsString),
                       EarthSRID));
        }
コード例 #3
0
        static void Querying()
        {
            using (var ctx = new ProjectsContext())
            {
                //id
                var bigProject = ctx.Projects.Find(1);

                //LINQ
                var usersInProjectWithLINQ = (from r in ctx.Resources
                                              from p in ctx.Projects
                                              where p.Name == "Big Project" &&
                                              r.ProjectResources.Select(x => x.Project).Contains(p)
                                              select r).ToList();

                var projectsByName           = ctx.Projects.Where(x => x.Name == "Big Project").ToList();
                var customersWithoutProjects = ctx.Customers.Where(c => c.Projects.Any() == false).ToList();

                //or
                var resourcesKnowingVBOrCS = ctx.Technologies.Where(t => t.Name == "VB.NET" || t.Name == "C#").SelectMany(x => x.Resources).Select(x => x.Name).ToList();

                //grouping
                var resourcesGroupedByProjectRole = ctx.Projects.SelectMany(x => x.ProjectResources).Select(x => new { Role = x.Role, Resource = x.Resource.Name }).GroupBy(x => x.Role).Select(x => new { Role = x.Key, Resources = x }).ToList();

                //grouping and counting
                var projectsByCustomer = ctx.Projects.GroupBy(x => x.Customer).Select(x => new { Customer = x.Key.Name, Count = x.Count() }).ToList();

                //top 10 customers having more projects in descending order
                var top10CustomersWithMoreProjects = ctx.Projects.GroupBy(x => x.Customer.Name).Select(x => new { x.Key, Count = x.Count() }).OrderByDescending(x => x.Count).Take(10).ToList();

                //grouping by date part and counting
                var countOfProjectsByMonth = ctx.Projects.GroupBy(x => EntityFunctions.CreateDateTime(x.Start.Year, x.Start.Month, 1, 0, 0, 0)).Select(x => new { Month = x.Key, Count = x.Count() }).ToList();

                //group and count the days between two dates
                var projectsGroupedByDurationDays = ctx.Projects.Where(x => x.End != null).GroupBy(x => EntityFunctions.DiffDays(x.Start, x.End.Value)).Select(x => new { Duration = x.Key, List = x }).ToList();

                //order by extension method
                var technologiesSortedByName = ctx.Technologies.OrderBy("Name").ThenBy("TechnologyId").ToList();

                //create a base query
                var projectsQuery = from p in ctx.Projects select p;

                //add sorting
                var projectsSortedByDateQuery = projectsQuery.OrderBy(x => x.Start);

                //execute and get the sorted results
                var projectsSortedByDateResults = projectsSortedByDateQuery.ToList();

                //add paging
                var projectsWithPagingQuery = projectsQuery.OrderBy(x => x.Start).Take(5).Skip(0);

                //execute and get the first 5 results
                var projectsWithPagingResults = projectsWithPagingQuery.ToList();

                //add a restriction
                var projectsStartingAWeekAgoQuery = projectsQuery.Where(x => x.Start >= EntityFunctions.AddDays(DateTime.Today, -7));

                //execute and get the projects that started a week ago
                var projectsStartingAWeekAgoResults = projectsStartingAWeekAgoQuery.ToList();

                //eager load properties
                var resourcesIncludingTechnologies = ctx.Resources.Include(x => x.Technologies).ToList();

                var projectsIncludingCustomers = ctx.Projects.Include("Customer").ToList();

                //distinct
                var roles = ctx.Resources.SelectMany(x => x.ProjectResources).Where(x => x.Resource.Name == "Ricardo Peres").Select(x => x.Role).Distinct().ToList();

                //check existence
                var existsProjectBySomeCustomer = ctx.Projects.Any(x => x.Customer.Name == "Some Customer");

                //count
                var numberOfClosedProjects = ctx.Projects.Where(x => x.End != null && x.End < DateTime.Now).Count();

                //average
                var averageProjectDuration = ctx.Projects.Where(x => x.End != null).Average(x => EntityFunctions.DiffDays(x.Start, x.End));

                //sum
                var sumProjectDurationsByCustomer = ctx.Projects.Where(x => x.End != null).Select(x => new { Customer = x.Customer.Name, Days = EntityFunctions.DiffDays(x.Start, x.End) }).GroupBy(x => x.Customer).Select(x => new { Customer = x.Key, Sum = x.Sum(y => y.Days) }).ToList();

                //return the resources and project names only
                var resourcesXprojects = ctx.Projects.SelectMany(x => x.ProjectResources).Select(x => new { Resource = x.Resource.Name, Project = x.Project.Name }).ToList();

                //return the customer names and their project counts
                var customersAndProjectCount = ctx.Customers.Select(x => new { x.Name, Count = x.Projects.Count() }).ToList();

                //subquery
                var usersKnowingATechnology  = (from r in ctx.Resources where r.Technologies.Any(x => (ctx.Technologies.Where(t => t.Name == "ASP.NET")).Contains(x)) select r).ToList();
                var usersKnowingATechnology2 = (from r in ctx.Resources where r.Technologies.Any(x => (from t in ctx.Technologies where t.Name == "ASP.NET" select t).Contains(x)) select r).ToList();

                //contains
                var customersToFind     = new String[] { "Some Customer", "Another Customer" };
                var projectsOfCustomers = ctx.Projects.Where(x => customersToFind.Contains(x.Customer.Name)).ToList();

                //spatial
                var location = DbGeography.FromText("POINT(41 8)");

                var area = DbGeography.MultiPointFromText("MULTIPOINT(53.095124 -0.864716, 53.021255 -1.337128, 52.808019 -1.345367, 52.86153 -1.018524)", 4326);

                /*var pointInsideArea = ctx.Venues.Where(x => area.Intersects(x.Location)).ToList();
                 *
                 * var venuesAndDistanceToLocation = (from v in ctx.Venues
                 *                        orderby v.Location.Distance(location)
                 *                        select new { Venue = v, Distance = v.Location.Distance(location) }).ToList();*/

                //Entity-SQL
                ObjectContext octx = (ctx as IObjectContextAdapter).ObjectContext;

                //filtering
                var usersInProjectWithESQL = octx.CreateQuery <Resource>("SELECT VALUE pr.Resource FROM ProjectResources AS pr WHERE pr.Project.Name = @name", new ObjectParameter("name", "Big Project")).ToList();

                //contains
                var usersKnowingATechnologyESQL = octx.CreateQuery <Resource>("SELECT VALUE r FROM Resources AS r WHERE EXISTS (SELECT VALUE t FROM Technologies AS t WHERE t.Name = @name AND r IN t.Resources)", new ObjectParameter("name", "ASP.NET")).ToList();

                //flatten
                var userTechnologiesESQL = octx.CreateQuery <Technology>("FLATTEN(SELECT VALUE r.Technologies FROM Resources AS r)").ToList();

                //paging
                var pagedResourcesESQL = octx.CreateQuery <Resource>("SELECT VALUE r FROM Resources AS r ORDER BY r.Name SKIP 5 LIMIT(5)").ToList();

                //paging with parameters
                var pagedResourcesWithParametersESQL = octx.CreateQuery <Resource>("SELECT VALUE r FROM Resources AS r ORDER BY r.Name SKIP @skip LIMIT(@limit)", new ObjectParameter("skip", 5), new ObjectParameter("limit", 5)).ToList();

                //top
                var lastProjectESQL = octx.CreateQuery <Project>("SELECT VALUE TOP(1) p FROM Projects AS p ORDER BY p.Start DESC").SingleOrDefault();

                //between
                var projectsStartingInADateIntervalESQL = octx.CreateQuery <Project>("SELECT VALUE p FROM Projects AS P WHERE p.Start BETWEEN @start AND @end", new ObjectParameter("start", DateTime.Today.AddDays(-14)), new ObjectParameter("end", DateTime.Today.AddDays(-7))).ToList();

                //in
                var projectsStartingInSetOfDatesESQL = octx.CreateQuery <Project>("SELECT VALUE p FROM Projects AS P WHERE p.Start IN MULTISET(DATETIME '2013-12-25 0:0:0', DATETIME '2013-12-31 0:0:0')").ToList();

                //projection
                var projectNameAndDurationESQL = octx.CreateQuery <Object>("SELECT p.Name, DIFFDAYS(p.Start, p.[End]) FROM Projects AS p WHERE p.[End] IS NOT NULL").ToList();

                //count
                var numberOfClosedProjectsESQL = octx.CreateQuery <Int32>("SELECT VALUE COUNT(p.ProjectId) FROM Projects AS p WHERE p.[End] IS NOT NULL AND p.[End] < @now", new ObjectParameter("now", DateTime.Now)).Single();

                //group
                var customersAndProjectCountIndicatorESQL = octx.CreateQuery <Object>("SELECT p.Customer.Name, COUNT(p.Name) FROM Projects AS p GROUP BY p.Customer").ToList();

                //case
                var customersAndProjectRangeESQL = octx.CreateQuery <Object>("SELECT p.Customer.Name, CASE WHEN COUNT(p.Name) > 10 THEN 'Lots' ELSE 'Few' END AS Amount FROM Projects AS p GROUP BY p.Customer").ToList();

                if (customersAndProjectRangeESQL.Any() == true)
                {
                    var r         = customersAndProjectRangeESQL.OfType <IExtendedDataRecord>().First();
                    var nameIndex = r.GetOrdinal("Name");
                    var name      = r.GetString(nameIndex);
                }

                //max number of days
                var maxDurationESQL = octx.CreateQuery <Int32?>("SELECT VALUE MAX(DIFFDAYS(p.Start, p.[End])) FROM Projects AS p WHERE p.[End] IS NOT NULL").SingleOrDefault();

                //string contains
                var technologiesContainingNetESQL = octx.CreateQuery <String>("SELECT VALUE t.Name FROM Technologies AS T WHERE CONTAINS(t.Name, '.NET')").ToList();

                //SQL
                var projectFromSQL = ctx.Projects.SqlQuery("SELECT * FROM Project WHERE Name = @p0", "Big Project").ToList();

                //stored procedure
                var projectFromProcedure = ctx.Projects.SqlQuery("SELECT * FROM dbo.GetProjectById(@p0)", 1).SingleOrDefault();

                var result = ctx.Database.ExecuteSqlCommand("UPDATE Project SET [End] = null WHERE ProjectId = {0}", 100);

                //current date and time
                var now = ctx.Database.SqlQuery <DateTime>("SELECT GETDATE()").Single();

                var model = ctx.Database.SqlQuery(typeof(Byte[]), "SELECT Model FROM __MigrationHistory").OfType <Object>().Single();

                //call function
                var serverTimestamp = ctx.ExecuteScalar <DateTime>("SELECT GETDATE()");

                //update records
                var updateCount = ctx.ExecuteNonQuery("UPDATE ProjectDetail SET Budget = Budget * 1.1 WHERE ProjectId = {0}", 1);

                //extensions
                var projectsBetweenTodayAndBeforeToday = ctx.Projects.Between(x => x.Start, DateTime.Today.AddDays(-1), DateTime.Today).ToList();

                //projects with 10 to 20 resources
                var projectsWithTwoOrThreeResources = ctx.Projects.Select(x => new { x.Name, ResourceCount = x.ProjectResources.Count() }).Between(x => x.ResourceCount, 10, 20).ToList();

                //extension method
                var soundex = ctx.Projects.Select(x => x.Name.Soundex()).ToList();

                //first level cache
                var user = ctx.Resources.Local.SingleOrDefault(x => x.Technologies.Any(y => y.Name == "ASP.NET"));

                //no caching
                var technologies = ctx.Technologies.AsNoTracking().ToList();
            }
        }
コード例 #4
0
                private static IEnumerable <MethodInfo> GetSupportedMethods()
                {
                    yield return(GetStaticMethod(() => DbGeography.FromText(default(string))));

                    yield return(GetStaticMethod(() => DbGeography.FromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.PointFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.LineFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.PolygonFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.MultiPointFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.MultiLineFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.MultiPolygonFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.GeographyCollectionFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.FromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.FromBinary(default(byte[]))));

                    yield return(GetStaticMethod(() => DbGeography.PointFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.LineFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.PolygonFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.MultiPointFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.MultiLineFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.MultiPolygonFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.GeographyCollectionFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeography.FromGml(default(string))));

                    yield return(GetStaticMethod(() => DbGeography.FromGml(default(string), default(int))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.AsBinary()));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.AsGml()));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.AsText()));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.SpatialEquals(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Disjoint(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Intersects(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Buffer(default(double))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Distance(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Intersection(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Union(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.Difference(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.SymmetricDifference(default(DbGeography))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.ElementAt(default(int))));

                    yield return(GetInstanceMethod((DbGeography geo) => geo.PointAt(default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.FromText(default(string))));

                    yield return(GetStaticMethod(() => DbGeometry.FromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.PointFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.LineFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.PolygonFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.MultiPointFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.MultiLineFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.MultiPolygonFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.GeometryCollectionFromText(default(string), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.FromBinary(default(byte[]))));

                    yield return(GetStaticMethod(() => DbGeometry.FromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.PointFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.LineFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.PolygonFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.MultiPointFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.MultiLineFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.MultiPolygonFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.GeometryCollectionFromBinary(default(byte[]), default(int))));

                    yield return(GetStaticMethod(() => DbGeometry.FromGml(default(string))));

                    yield return(GetStaticMethod(() => DbGeometry.FromGml(default(string), default(int))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.AsBinary()));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.AsGml()));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.AsText()));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.SpatialEquals(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Disjoint(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Intersects(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Touches(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Crosses(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Within(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Contains(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Overlaps(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Relate(default(DbGeometry), default(string))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Buffer(default(double))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Distance(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Intersection(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Union(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.Difference(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.SymmetricDifference(default(DbGeometry))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.ElementAt(default(int))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.PointAt(default(int))));

                    yield return(GetInstanceMethod((DbGeometry geo) => geo.InteriorRingAt(default(int))));
                }
コード例 #5
0
                private static Dictionary <MethodInfo, string> GetRenamedMethodFunctions()
                {
                    var result = new Dictionary <MethodInfo, string>();

                    result.Add(GetStaticMethod(() => DbGeography.FromText(default(string))), "GeographyFromText");
                    result.Add(GetStaticMethod(() => DbGeography.FromText(default(string), default(int))), "GeographyFromText");
                    result.Add(GetStaticMethod(() => DbGeography.PointFromText(default(string), default(int))), "GeographyPointFromText");
                    result.Add(GetStaticMethod(() => DbGeography.LineFromText(default(string), default(int))), "GeographyLineFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeography.PolygonFromText(default(string), default(int))), "GeographyPolygonFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeography.MultiPointFromText(default(string), default(int))), "GeographyMultiPointFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeography.MultiLineFromText(default(string), default(int))), "GeographyMultiLineFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeography.MultiPolygonFromText(default(string), default(int))),
                        "GeographyMultiPolygonFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeography.GeographyCollectionFromText(default(string), default(int))),
                        "GeographyCollectionFromText");
                    result.Add(GetStaticMethod(() => DbGeography.FromBinary(default(byte[]), default(int))), "GeographyFromBinary");
                    result.Add(GetStaticMethod(() => DbGeography.FromBinary(default(byte[]))), "GeographyFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeography.PointFromBinary(default(byte[]), default(int))), "GeographyPointFromBinary");
                    result.Add(GetStaticMethod(() => DbGeography.LineFromBinary(default(byte[]), default(int))), "GeographyLineFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeography.PolygonFromBinary(default(byte[]), default(int))), "GeographyPolygonFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeography.MultiPointFromBinary(default(byte[]), default(int))),
                        "GeographyMultiPointFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeography.MultiLineFromBinary(default(byte[]), default(int))),
                        "GeographyMultiLineFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeography.MultiPolygonFromBinary(default(byte[]), default(int))),
                        "GeographyMultiPolygonFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeography.GeographyCollectionFromBinary(default(byte[]), default(int))),
                        "GeographyCollectionFromBinary");
                    result.Add(GetStaticMethod(() => DbGeography.FromGml(default(string))), "GeographyFromGml");
                    result.Add(GetStaticMethod(() => DbGeography.FromGml(default(string), default(int))), "GeographyFromGml");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.AsBinary()), "AsBinary");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.AsGml()), "AsGml");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.AsText()), "AsText");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.SpatialEquals(default(DbGeography))), "SpatialEquals");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Disjoint(default(DbGeography))), "SpatialDisjoint");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Intersects(default(DbGeography))), "SpatialIntersects");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Buffer(default(double))), "SpatialBuffer");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Distance(default(DbGeography))), "Distance");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Intersection(default(DbGeography))), "SpatialIntersection");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Union(default(DbGeography))), "SpatialUnion");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.Difference(default(DbGeography))), "SpatialDifference");
                    result.Add(
                        GetInstanceMethod((DbGeography geo) => geo.SymmetricDifference(default(DbGeography))), "SpatialSymmetricDifference");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.ElementAt(default(int))), "SpatialElementAt");
                    result.Add(GetInstanceMethod((DbGeography geo) => geo.PointAt(default(int))), "PointAt");
                    result.Add(GetStaticMethod(() => DbGeometry.FromText(default(string))), "GeometryFromText");
                    result.Add(GetStaticMethod(() => DbGeometry.FromText(default(string), default(int))), "GeometryFromText");
                    result.Add(GetStaticMethod(() => DbGeometry.PointFromText(default(string), default(int))), "GeometryPointFromText");
                    result.Add(GetStaticMethod(() => DbGeometry.LineFromText(default(string), default(int))), "GeometryLineFromText");
                    result.Add(GetStaticMethod(() => DbGeometry.PolygonFromText(default(string), default(int))), "GeometryPolygonFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.MultiPointFromText(default(string), default(int))), "GeometryMultiPointFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.MultiLineFromText(default(string), default(int))), "GeometryMultiLineFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.MultiPolygonFromText(default(string), default(int))),
                        "GeometryMultiPolygonFromText");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.GeometryCollectionFromText(default(string), default(int))),
                        "GeometryCollectionFromText");
                    result.Add(GetStaticMethod(() => DbGeometry.FromBinary(default(byte[]))), "GeometryFromBinary");
                    result.Add(GetStaticMethod(() => DbGeometry.FromBinary(default(byte[]), default(int))), "GeometryFromBinary");
                    result.Add(GetStaticMethod(() => DbGeometry.PointFromBinary(default(byte[]), default(int))), "GeometryPointFromBinary");
                    result.Add(GetStaticMethod(() => DbGeometry.LineFromBinary(default(byte[]), default(int))), "GeometryLineFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.PolygonFromBinary(default(byte[]), default(int))), "GeometryPolygonFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.MultiPointFromBinary(default(byte[]), default(int))),
                        "GeometryMultiPointFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.MultiLineFromBinary(default(byte[]), default(int))), "GeometryMultiLineFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.MultiPolygonFromBinary(default(byte[]), default(int))),
                        "GeometryMultiPolygonFromBinary");
                    result.Add(
                        GetStaticMethod(() => DbGeometry.GeometryCollectionFromBinary(default(byte[]), default(int))),
                        "GeometryCollectionFromBinary");
                    result.Add(GetStaticMethod(() => DbGeometry.FromGml(default(string))), "GeometryFromGml");
                    result.Add(GetStaticMethod(() => DbGeometry.FromGml(default(string), default(int))), "GeometryFromGml");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.AsBinary()), "AsBinary");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.AsGml()), "AsGml");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.AsText()), "AsText");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.SpatialEquals(default(DbGeometry))), "SpatialEquals");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Disjoint(default(DbGeometry))), "SpatialDisjoint");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Intersects(default(DbGeometry))), "SpatialIntersects");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Touches(default(DbGeometry))), "SpatialTouches");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Crosses(default(DbGeometry))), "SpatialCrosses");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Within(default(DbGeometry))), "SpatialWithin");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Contains(default(DbGeometry))), "SpatialContains");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Overlaps(default(DbGeometry))), "SpatialOverlaps");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Relate(default(DbGeometry), default(string))), "SpatialRelate");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Buffer(default(double))), "SpatialBuffer");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Distance(default(DbGeometry))), "Distance");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Intersection(default(DbGeometry))), "SpatialIntersection");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Union(default(DbGeometry))), "SpatialUnion");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.Difference(default(DbGeometry))), "SpatialDifference");
                    result.Add(
                        GetInstanceMethod((DbGeometry geo) => geo.SymmetricDifference(default(DbGeometry))), "SpatialSymmetricDifference");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.ElementAt(default(int))), "SpatialElementAt");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.PointAt(default(int))), "PointAt");
                    result.Add(GetInstanceMethod((DbGeometry geo) => geo.InteriorRingAt(default(int))), "InteriorRingAt");
                    return(result);
                }