Ich möchte zu wissen, wie es funktioniert zu machen, da es InvalidCastException wirft:Ungültige Span Besetzung in Microsoft.SqlServer.Server
ich versucht habe, mit DateTime.Now.TimeOfDay
, aber ich habe den gleichen Fehler.
Stapelüberwachung:
em Microsoft.SqlServer.Server.ValueUtilsSmi.SetTimeSpan(SmiEventSink_Default sink, ITypedSettersV3 setters, Int32 ordinal, SmiMetaData metaData, TimeSpan value, Boolean settersSupportKatmaiDateTime)
em Microsoft.SqlServer.Server.SqlDataRecord.SetTimeSpan(Int32 ordinal, TimeSpan value)
em Matematica.UI.Areas.Professor.Controllers.ListasController.ObterTurmas(List`1 agendamentos) na C:\Users\murilo\Source\Repos\moderna-matematica\Matematica.UI\Areas\Professor\Controllers\ListasController.cs:linha 127
em Matematica.UI.Areas.Professor.Controllers.ListasController.Agendar(AdicionarAgendamento agendamento) na C:\Users\murilo\Source\Repos\moderna-matematica\Matematica.UI\Areas\Professor\Controllers\ListasController.cs:linha 112
em lambda_method(Closure , ControllerBase , Object[])
em System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
em System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
em System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
em System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
em System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
em System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
em System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
em System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
em System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
Ein SQL Server-Zeitstempel ist mehr eine Versionsnummer als eine tatsächliche Zeit. Es ist ein C# -äquivalenter Datentyp ist "byte []" oder ein Byte-Array. – Cameron