asp.net mvc - DbContext SaveChangesAsync Exception -


I want to ride a new one, I have this code for:

  Using (Var db = New CarManagerDbEntities ()) {Guide? Car ID = GetCarId (Carlenense); If (car id == zero) {return tap; } Guid rideId = Guid.NewGuid (); Ride newRide = new ride () {DriverID = driverId, Carid = carId.Value, StartDrive = startTime, id = ride id}; Db.Ride.Add (newRide); Wait db.SaveChangesAsync (); Return car ID; }  

but in line:

await db.SaveChangesAsync ();

I get this exception:

  System.ServiceModel.FaultException `1 was unchecked HResult = -2146233087 Message = An error occurred while updating the entries View Internal Exceptions for Details Source = mscorlib  

StackTrace:

  Server Stack Trace: System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood (Message replies , MessageFault Error, String Action, MessageVersion Edition, FaultConverter faultConverter) System.ServiceModel.Channels.ServiceChannel.HandleReply (less than ProxyOperationRuntime operation, ProxyRpc & RPC) System.ServiceModel.Channels.ServiceChannel.Ca On System.ServiceModel.Channels.ServiceChannelProxy.InvokeService (IMethodCallMessage methodCall, ProxyOperationRuntime operation) System.ServiceModel.Channels (String Action, Boolean Oneway, ProxyOperationRuntime operation, Object [] These, Object [] Exclusion, TimeSpan expired) Exception in ServiceChannelProxy.Invoke (iMessage Message) rethrown [0]: on System.Runtime. Remoting.Proxies.RealProxy.HandleReturnMessage (iMessage reqMsg, iMessage retMsg) System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageData & Meter SGDTA, int 32 types) in Caraminer Testing CLI.Careman service Reference. ICRM ANGAP In StartenRID (Guide Driver ID, Datetime Start-Up, String Carriage Insurance) in the CarManager. Testing CLI Carmencerus Service Reference. Kernelmager api client StartDownRed (Guide Driver ID, Datetime Start-Up, String Carriagees Eddie) in C: \ PROJECTS \ CarManager.TestingCLI \ Service Reference \ CarManagerServiceReference \ Reference.cs: Line 990 (String [] args on CarManager.TestingCLI.Program.Main C: \ Projetcs \ CarManager.TestingCLI \ Program.cs: line 17. System.AppDomain on ._nExecuteAssembly (Runtime assembly, string [] AGR). System on AppDomain.ExecuteAssembly (string assembly file, proof assembly security, string [] args) at Microsoft. Visual Studio Hosting process Hostpro rate RURERSSambands () systems threading. ThreadHalper ThreadStart Tagtext Object State) System Threading in. Execution Contact Rein Initial (Execution Contains Extensions Contains, Context Callback Callback, Object St System. Boolean Secure Sync CTX). On the system threading. Execution Contact Run (execution concurrent execution context, context callback callback, object state, boolean circuit sync, CTX) system. threading. Execution Constant. Run (Execution Contact Exchange Context, ContactClult Callback, Object State) System. threading. ThreadHalper 

/ html>

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -