profile
viewpoint
Albert Weinert DerAlbertCom Der-Albert.com Cologne, Germany https://blog.der-albert.com

aspnetde/UrlRewritingNet 31

Easy and reliable rewriting of URLs with ASP.NET

DerAlbertCom/ApereaFramework 8

My Base Framework for nearly every project

DerAlbertCom/FluentMetadata 5

FluentMetadata for Models with Composition and Validation for ASP.NET MVC 2&3, FluentNHibernate and Entity Framework 4 CodeFirst with Feature CTP 4

DerAlbertCom/CodingDojo-StopWatch 4

A Stopwatch for CodingDojos, with changing Teams (Randori Style)

DerAlbertCom/AdvancedMVC 3

Advanced using of ASP.NET MVC, Source from my Talks. Slides http://www.slideshare.net/DerAlbertCom/advanced-aspnet-2-05102010

DerAlbertCom/DNUG 2

Website from the .net user group Köln

DerAlbertCom/Machine.Fakes.Mvc 1

MVC Specific Mocking additions for Machine.Fakes

DerAlbertCom/NOUGVideoTemplating 1

A Powershell Scripts which fills an existings Movie Maker Template with the right length of an given screen cast video file

PR opened vuejs/composition-api

Adding Emits typed SetupContext to setup function

If you define a component with emits, then you can type this.$emits

So with this, you get autocompletion and signature validation on this.$emit

  defineComponent({
    emits: {
      click: (n: number) => typeof n === 'number',
      input: (b: string) => b.length > 1,
    },
    created() {
      this.$emit('click', 1)
      this.$emit('input', 'foo')
    },
  })

but you don't get the same behavior in the setup function.

  defineComponent({
    emits: {
      click: (n: number) => typeof n === 'number',
      input: (b: string) => b.length > 1,
    },
    setup(props, { emit ) {
      emit('click', 1)
      emit('input', 'foo')
    },
  })

this will work, gives no errors, but also no auto completion or compilation safety with typescript.

This PR is will enable that, so that the emit property of the SetupContext has typed emits.

image

I don't know if there is a reason why this is not already the behavior of SetupContext, but it seems to be a good addition.

+14 -6

0 comment

3 changed files

pr created time in 13 days

push eventDerAlbertCom/composition-api

Albert Weinert

commit sha 8f66b1db95910e4de925ced5f52961c8a50d7cce

Adding Emits type SetupContext to setup function

view details

push time in 13 days

push eventDerAlbertLive/MyInvoices

Albert Weinert

commit sha 1a82c0561793640d7213e387b603d19c60d3c45a

Added Breadcrump component

view details

push time in 16 days

push eventDerAlbertLive/MyInvoices

Albert Weinert

commit sha 4a64f3aaee260bfede4736040727c144ebe5a3b9

Upgrade to .NET 6

view details

Albert Weinert

commit sha e31af883c5c402ee4cb7d68307d5dd0d2129d877

upgrade to vue cli 5 rc1

view details

Albert Weinert

commit sha 0326e41a8133f5c8b7eaacc5ded873902f2e6fe2

Compiling with no Issues

view details

Albert Weinert

commit sha 7cd5b122d3cfcafc5f757e1d1e72b2657071cb3a

Tailwind 3 and Stuff

view details

Albert Weinert

commit sha 185fc7d1413e9884c5656f7487ac9413ebee61c2

Fixed Running Test, easier store usage

view details

Albert Weinert

commit sha 2f14c33eb6361218ec93bf70fcd4f0293170ae44

Store Improvements

view details

Albert Weinert

commit sha c5043e00ba4d9d741657bd56f9298afbdcb645d0

Eslint and other Stuff

view details

Albert Weinert

commit sha c886aa50497900ae84ecaab7652f4a9e63ea7cd5

Cleanup

view details

push time in 24 days

issue closeddotnet/efcore

Regression in .NET 6 and/or EF Core 6.0: file based Sqlite database file is blocked after use.

Description

I think I found a regression in Microsoft.EntityFrameworkCore.Sqlite Version 6.0.0 under Windows 10. It works find with 5.0.x, and also it works without a problem under Mac OS 11/12.

For "Unit test" we needed a database, so we used Sqlite for that. For one test we needed per persistent Db File for this. After the Test we manually deleted the Database with File.Delete() so that everything I clean after the test. We didn't use DbContext.Database.EnsureDeleted() because we have no easy access to the DbContext. In the sample project I tested it also with EnsureDeleted() and that worked.

Here is the code and a sample project (minimal) for

The Test

https://github.com/DerAlbertCom/EfCore6Regression/blob/2046cc5d11d63e4b0ccf7589dbfab2d2dc34fe86/Regression/TheNet6RegressionTest.cs#L11-L56

The Project

https://github.com/DerAlbertCom/EfCore6Regression/

The test works fine with .NET 5 und fails with .NET 6 on Windows.

dotnet test will run the test on both frameworks.

stack trace

This exceptions is thrown with .NET 6 on Windows 10.

System.IO.IOException: The process cannot access the file 'C:\src\private\EFCore6Regression\EFCore6Regression\Regression\bin\Debug\net6.0\cb3011cf-c2a...

System.IO.IOException
The process cannot access the file 'C:\src\private\EFCore6Regression\EFCore6Regression\Regression\bin\Debug\net6.0\cb3011cf-c2ac-4308-8cda-452ce83c0d4b.db' because it is being used by another process.
   at System.IO.FileSystem.DeleteFile(String fullPath)
   at System.IO.File.Delete(String path)
   at Regression.TheNet6RegressionTest.Dispose() in C:\src\private\EFCore6Regression\EFCore6Regression\Regression\TheNet6RegressionTest.cs:line 53
   at Xunit.Sdk.ExecutionTimer.Aggregate(Action action) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 31
   at ReflectionAbstractionExtensions.DisposeTestClass(ITest test, Object testClass, IMessageBus messageBus, ExecutionTimer timer, CancellationTokenSource cancellationTokenSource) in C:\Dev\xunit\xunit\src\xunit.execution\Extensions\ReflectionAbstractionExtensions.cs:line 79
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass47_0.<RunAsync>b__1() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 216
   at Xunit.Sdk.ExceptionAggregator.Run(Action code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 73

Include provider and version information

EF Core version: 6.0 Database provider: Microsoft.EntityFrameworkCore.Sqlite Target framework: .NET 6.0 Operating system: Windows 10 IDE: dotnet test

closed time in 2 months

DerAlbertCom

issue commentdotnet/efcore

Regression in .NET 6 and/or EF Core 6.0: file based Sqlite database file is blocked after use.

Thank you. Didn't thought about looking up the Breaking Changes.

DerAlbertCom

comment created time in 2 months

issue openeddotnet/efcore

Regression in .NET 6 and/or EF Core 6.0: file based Sqlite database file is blocked after use.

Description

I think I found a regression in Microsoft.EntityFrameworkCore.Sqlite Version 6.0.0 under Windows 10. It works find with 5.0.x, and also it works without a problem under Mac OS 11/12.

For "Unit test" we needed a database, so we used Sqlite for that. For one test we needed per persistent Db File for this. After the Test we manually deleted the Database with File.Delete() so that everything I clean after the test. We didn't use DbContext.Database.EnsureDeleted() because we have no easy access to the DbContext. In the sample project I tested it also with EnsureDeleted() and that worked.

Here is the code and a sample project (minimal) for

The Test

https://github.com/DerAlbertCom/EfCore6Regression/blob/2046cc5d11d63e4b0ccf7589dbfab2d2dc34fe86/Regression/TheNet6RegressionTest.cs#L11-L56

The Project

https://github.com/DerAlbertCom/EfCore6Regression/

The test works fine with .NET 5 und fails with .NET 6 on Windows.

dotnet test will run the test on both frameworks.

stack trace

This exceptions is thrown with .NET 6 on Windows 10.

System.IO.IOException: The process cannot access the file 'C:\src\private\EFCore6Regression\EFCore6Regression\Regression\bin\Debug\net6.0\cb3011cf-c2a...

System.IO.IOException
The process cannot access the file 'C:\src\private\EFCore6Regression\EFCore6Regression\Regression\bin\Debug\net6.0\cb3011cf-c2ac-4308-8cda-452ce83c0d4b.db' because it is being used by another process.
   at System.IO.FileSystem.DeleteFile(String fullPath)
   at System.IO.File.Delete(String path)
   at Regression.TheNet6RegressionTest.Dispose() in C:\src\private\EFCore6Regression\EFCore6Regression\Regression\TheNet6RegressionTest.cs:line 53
   at Xunit.Sdk.ExecutionTimer.Aggregate(Action action) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 31
   at ReflectionAbstractionExtensions.DisposeTestClass(ITest test, Object testClass, IMessageBus messageBus, ExecutionTimer timer, CancellationTokenSource cancellationTokenSource) in C:\Dev\xunit\xunit\src\xunit.execution\Extensions\ReflectionAbstractionExtensions.cs:line 79
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass47_0.<RunAsync>b__1() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 216
   at Xunit.Sdk.ExceptionAggregator.Run(Action code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 73

Include provider and version information

EF Core version: 6.0 Database provider: Microsoft.EntityFrameworkCore.Sqlite Target framework: .NET 6.0 Operating system: Windows 10 IDE: dotnet test

created time in 2 months

create barnchDerAlbertCom/EfCore6Regression

branch : main

created branch time in 2 months

created repositoryDerAlbertCom/EfCore6Regression

created time in 2 months

push eventDerAlbertCom/Razor2Liquid

Albert Weinert

commit sha a5fcece9a9e9264c34b9e13c80038e6b3a678ac0

If else if Else (Simple Case)

view details

Albert Weinert

commit sha 51cf7d4ff3992c1d4dae631cb32741cc3a3fd9ac

Some more Fixes

view details

Albert Weinert

commit sha d9a43e4a7cd59b2a5f802723fb2fc20d46fe6057

Better Indentation

view details

push time in 3 months

push eventDerAlbertCom/Razor2Liquid

Albert Weinert

commit sha efde1c8dbfad58eb3976fae77749d62ddecad5d6

Refactored to Expression and CSharpSyntaxNode

view details

Albert Weinert

commit sha 825e8ff6b2734ea5ba325c983dd3006b14a0412f

casting

view details

Albert Weinert

commit sha 74bbddc0b9624912e772ba438e68f723a69db594

unless

view details

Albert Weinert

commit sha 634fde7f875f1afd67700b7e64dbd86df0c1927f

Raw

view details

Albert Weinert

commit sha bc41082415c6f96c62dcf1ee8b7d5060de5e6e09

ShowBoleto, ShowWriteTransfer etc.

view details

Albert Weinert

commit sha d327ae7411bda4e63bc87f613fb417c22a73c2ab

Helper Extraction

view details

push time in 3 months

more