profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/smitpatel/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Smit Patel smitpatel @Microsoft Redmond Software developer for @dotnet

smitpatel/AspNetCoreOData 0

ASP.NET Core OData: A server library built upon ODataLib and ASP.NET Core

smitpatel/ConsoleApp 0

Repro code for VS4Mac

smitpatel/dotnet-buildtools-prereqs-docker 0

Used to maintain the Docker images hosted at the mcr.microsoft.com/dotnet-buildtools/prereqs repository

smitpatel/DotNetCodingPatterns 0

A collection of coding patterns in no particular order

smitpatel/EFSampleApp 0

Sample application for EF Core to test bugs

PullRequestReviewEvent

Pull request review commentdotnet/efcore

Add ToTable overloads with TableBuilder for OwnedNavigationBuilder

 public static class RelationalEntityTypeBuilderExtensions         /// <returns> The same builder instance so that multiple calls can be chained. </returns>         public static EntityTypeBuilder ToTable(             this EntityTypeBuilder entityTypeBuilder,-            string name,+            string? name,             Action<TableBuilder> buildAction)-            => entityTypeBuilder.ToTable(name, null, buildAction);+        {+            Check.NullButNotEmpty(name, nameof(name));+            Check.NotNull(buildAction, nameof(buildAction));++            buildAction(new TableBuilder(name, null, entityTypeBuilder.Metadata));

does the ordering matter here? if the build action steps are utilizing the table name to be set?

AndriySvyryd

comment created time in 11 hours

PullRequestReviewEvent
PullRequestReviewEvent

issue commentdotnet/efcore

Query: add translation for string.Concat

There is already translation and we have tracking issue for return type

maumar

comment created time in 3 days

issue commentdotnet/efcore

Scaffolded DbContext contains unnecessary configuration

For index #14917

ajcvickers

comment created time in 3 days

pull request commentdotnet/efcore

[SMALL] Adding translation for string.Length on Cosmos

/azp run

maumar

comment created time in 3 days

PullRequestReviewEvent

pull request commentdotnet/efcore

[SMALL] Adding translation for string.Length on Cosmos

something failing.

maumar

comment created time in 3 days

Pull request review commentdotnet/efcore

Cosmos: Add API to configure TTL and throughput

+// Licensed to the .NET Foundation under one or more agreements.+// The .NET Foundation licenses this file to you under the MIT license.++using Microsoft.Azure.Cosmos;++namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal+{+    /// <summary>+    ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+    ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+    ///     any release. You should only use it directly in your code with extreme caution and knowing that+    ///     doing so can result in application failures when updating to a new Entity Framework Core release.+    /// </summary>+    public record struct ContainerProperties+    {+        /// <summary>+        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+        ///     any release. You should only use it directly in your code with extreme caution and knowing that+        ///     doing so can result in application failures when updating to a new Entity Framework Core release.+        /// </summary>+        public readonly string Id;++        /// <summary>+        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+        ///     any release. You should only use it directly in your code with extreme caution and knowing that+        ///     doing so can result in application failures when updating to a new Entity Framework Core release.+        /// </summary>+        public readonly string PartitionKey;++        /// <summary>+        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+        ///     any release. You should only use it directly in your code with extreme caution and knowing that+        ///     doing so can result in application failures when updating to a new Entity Framework Core release.+        /// </summary>+        public readonly int? AnalyticalStoreTimeToLiveInSeconds;

Saw that it is to match with cosmos client.

AndriySvyryd

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentdotnet/efcore

Cosmos: Add API to configure TTL and throughput

+// Licensed to the .NET Foundation under one or more agreements.+// The .NET Foundation licenses this file to you under the MIT license.++using Microsoft.Azure.Cosmos;++namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal+{+    /// <summary>+    ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+    ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+    ///     any release. You should only use it directly in your code with extreme caution and knowing that+    ///     doing so can result in application failures when updating to a new Entity Framework Core release.+    /// </summary>+    public record struct ContainerProperties+    {+        /// <summary>+        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+        ///     any release. You should only use it directly in your code with extreme caution and knowing that+        ///     doing so can result in application failures when updating to a new Entity Framework Core release.+        /// </summary>+        public readonly string Id;++        /// <summary>+        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+        ///     any release. You should only use it directly in your code with extreme caution and knowing that+        ///     doing so can result in application failures when updating to a new Entity Framework Core release.+        /// </summary>+        public readonly string PartitionKey;++        /// <summary>+        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to+        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in+        ///     any release. You should only use it directly in your code with extreme caution and knowing that+        ///     doing so can result in application failures when updating to a new Entity Framework Core release.+        /// </summary>+        public readonly int? AnalyticalStoreTimeToLiveInSeconds;

One TTL contains InSeconds ending? Are they different value in server side too?

AndriySvyryd

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentdotnet/efcore

Skip and warn of duplicated SQL Server foreign keys

 public void Skip_reflexive_foreign_key() DROP TABLE PrincipalTable;");         } +        [ConditionalFact]+        public void Skip_duplicate_foreign_key()+        {+            Test(+                @"CREATE TABLE PrincipalTable (+    Id int PRIMARY KEY,+);++CREATE TABLE OtherPrincipalTable (+    Id int PRIMARY KEY,+);++CREATE TABLE DependentTable (+    Id int PRIMARY KEY,+    ForeignKeyId int,+    CONSTRAINT MYFK1 FOREIGN KEY (ForeignKeyId) REFERENCES PrincipalTable(Id),+    CONSTRAINT MYFK2 FOREIGN KEY (ForeignKeyId) REFERENCES PrincipalTable(Id),+	CONSTRAINT MYFK3 FOREIGN KEY (ForeignKeyId) REFERENCES OtherPrincipalTable(Id),

Nit: Just align this line.

ErikEJ

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentdotnet/efcore

Skip and warn of duplicated SQL Server foreign keys

 private void GetForeignKeys(DbConnection connection, IReadOnlyList<DatabaseTable                         }                         else                         {+                            var duplicated = table.ForeignKeys

Didn't realize PrincipalTable was class. Thought it was string.

ErikEJ

comment created time in 4 days

Pull request review commentdotnet/efcore

Skip and warn of duplicated SQL Server foreign keys

 private void GetForeignKeys(DbConnection connection, IReadOnlyList<DatabaseTable                         }                         else                         {+                            var duplicated = table.ForeignKeys

match schema also? 🤔

ErikEJ

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentdotnet/efcore

Skip and warn of duplicated SQL Server foreign keys

 private void GetForeignKeys(DbConnection connection, IReadOnlyList<DatabaseTable                         }                         else                         {+                            var duplicated = table.ForeignKeys.FirstOrDefault(k => k.Columns.SequenceEqual(foreignKey.Columns));

The FK should also have same principal table for duplicate. Multiple overlapping FK targeting different entity types should work.

ErikEJ

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentdotnet/efcore

Incorporate API Review feedback

 DbContextOptionsBuilder IInMemoryDbContextOptionsBuilderInfrastructure.OptionsBu         ///         Enables nullability check for all properties across all entities within the in-memory database.         ///     </para>         /// </summary>-        /// <param name="nullabilityCheckEnabled"> If <see langword="true" />, then nullability check is enforced. </param>+        /// <param name="nullChecksEnabled"> If <see langword="true" />, then nullability check is enforced. </param>         /// <returns> The same builder instance so that multiple calls can be chained. </returns>-        public virtual InMemoryDbContextOptionsBuilder EnableNullabilityCheck(bool nullabilityCheckEnabled = true)+        public virtual InMemoryDbContextOptionsBuilder EnableNullChecks(bool nullChecksEnabled = true)         {             var extension = OptionsBuilder.Options.FindExtension<InMemoryOptionsExtension>()                 ?? new InMemoryOptionsExtension(); -            extension = extension.WithNullabilityCheckEnabled(nullabilityCheckEnabled);+            extension = extension.WithNullabilityCheckEnabled(nullChecksEnabled);

Well in that case, I am fine with anything.

bricelam

comment created time in 4 days

PullRequestReviewEvent

issue commentdotnet/efcore

Asynchronous query getting custom objects

This should be raised on runtime repo. This doesn't related to EF Core or expression tree construction either. Looks like some odd rules in method resolution.

ctrl-alt-d

comment created time in 5 days

Pull request review commentdotnet/efcore

Incorporate API Review feedback

 public void IsRequired_for_property_throws_while_inserting_null_value()                          var optionsBuilder = new DbContextOptionsBuilder()                             .UseModel(modelBuilder.FinalizeModel())-                            .UseInMemoryDatabase(nameof(NullabilityCheckInMemoryTest), b => b.EnableNullabilityCheck())+                            .UseInMemoryDatabase(nameof(NullabilityCheckInMemoryTest), b => b.EnableNullChecks())

may be change nameof arg?

bricelam

comment created time in 6 days

PullRequestReviewEvent

Pull request review commentdotnet/efcore

Incorporate API Review feedback

 DbContextOptionsBuilder IInMemoryDbContextOptionsBuilderInfrastructure.OptionsBu         ///         Enables nullability check for all properties across all entities within the in-memory database.         ///     </para>         /// </summary>-        /// <param name="nullabilityCheckEnabled"> If <see langword="true" />, then nullability check is enforced. </param>+        /// <param name="nullChecksEnabled"> If <see langword="true" />, then nullability check is enforced. </param>         /// <returns> The same builder instance so that multiple calls can be chained. </returns>-        public virtual InMemoryDbContextOptionsBuilder EnableNullabilityCheck(bool nullabilityCheckEnabled = true)+        public virtual InMemoryDbContextOptionsBuilder EnableNullChecks(bool nullChecksEnabled = true)         {             var extension = OptionsBuilder.Options.FindExtension<InMemoryOptionsExtension>()                 ?? new InMemoryOptionsExtension(); -            extension = extension.WithNullabilityCheckEnabled(nullabilityCheckEnabled);+            extension = extension.WithNullabilityCheckEnabled(nullChecksEnabled);

With method name?

bricelam

comment created time in 6 days

PullRequestReviewEvent