Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Error in EntityFramework

$
0
0

here i am facing below error

An exception of type 'System.ArgumentException' occurred in EntityFramework.dll but was not handled in user code

Additional information: The ADO.NET provider with invariant name 'System.Data.EntityClient;' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.

i have downloaded app from here

https://www.c-sharpcorner.com/article/user-specific-notifications-using-asp-net-mvc-and-signalr/

here is the action method where i m facing an error

 [HttpPost]
        public HttpResponseMessage SendNotification(NotifModels obj)
        {
            NotificationHub objNotifHub = new NotificationHub();
            Notification objNotif = new Notification();
            objNotif.SentTo = obj.UserID;

            context.Configuration.ProxyCreationEnabled = false;
            context.Notifications.Add(objNotif);
            context.SaveChanges();

            objNotifHub.SendNotification(objNotif.SentTo);

            var query = (from t in context.Notifications
                         select t).ToList();

            return Request.CreateResponse(HttpStatusCode.OK, new { query });
        }

any one can help me ,how to remove error , I googled but did not find solution so far


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>