How fix System.ArgumentNullException

Christian Nahbi 0 Reputation points
2024-10-28T16:59:54.3833333+00:00

L'erreur complet :

System.ArgumentNullException

HResult=0x80004003

Message=Value cannot be null. Arg_ParamName_Name

Source=Microsoft.EntityFrameworkCore

Arborescence des appels de procédure :

à Microsoft.EntityFrameworkCore.Utilities.Check.NotNull[T]

à Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)

à Ango.Data.AngoContext..ctor(DbContextOptions`1 options) dans C:\Users\pc\OneDrive\Bureau\Dev\Ango\Ango\Data\AngoContext.cs :ligne 15

à Ango.Views.ProductView..ctor() dans C:\Users\pc\OneDrive\Bureau\Dev\Ango\Ango\Views\ProductView.xaml.cs :ligne 37

à Ango.ViewModels.MainVM.<.ctor>b__32_2(Object o) dans C:\Users\pc\OneDrive\Bureau\Dev\Ango\Ango\ViewModels\MainVM.cs :ligne 53

à Ango.Commands.RelayCommand.Execute(Object parameter) dans C:\Users\pc\OneDrive\Bureau\Dev\Ango\Ango\Commands\RelayCommand.cs :ligne 23

à System.Windows.Controls.Button.OnClick()

à System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

à System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

à System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

à System.Windows.Input.InputManager.ProcessStagingArea()

à System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

à System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

à System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

à System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

à MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

à System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

à System.Windows.Application.RunDispatcher(Object ignore)

à System.Windows.Application.RunInternal(Window window)

à Ango.App.Main()

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
755 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,940 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
816 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.