Welcome to Sign in | Help
in Search

SubmitChanges() issues

Last post 09-04-2008, 1:18 PM by ignatandrei. 1 replies.
Sort Posts: Previous Next
  •  09-04-2008, 1:11 PM 5553

    SubmitChanges() issues

    Intr-un serviciu web trebuie sa inserez niste randuri intr-o tabela intr-un eveniment care se executa asyncrom.E vorba de evenimetul smtpclient.sentonterminate

    codul e ceva de genu:

    dbcontext.NewsletterHistories.InsertOnSubmit(new NewsletterHistory { CompanyID = (e.UserState as Company).ID, SendDate = DateTime.Now, Mesaj = "mesaj trimis cu succes", Succes = true });

     dbcontext.SubmitChanges();

    Problema e ca din cand in cand linia cu submitchanges imi ridica diferite exceptii asta seintampla la urmatoarele apeluri ale metodei -din prima data merge.

    Sunt la inceput in linq si nu inteleg prea bine conceputl de dbcontext imi puteti explica va rog cum sta treaba?

    Multumesc

     


    Secolul XXI ori va fi religios ori nu va fi deloc
  •  09-04-2008, 1:18 PM 5554 in reply to 5553

    Re: SubmitChanges() issues

    DAta context - in mare se comporta ca o conexiune ce tine si "tabelele"
    Ce exceptii iti da?

    Ignat Andrei
    http://serviciipeweb.ro/iafblog
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems