Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Jan 2010
    Location
    England
    Posts
    35
    Thanks
    4
    Thanked 0 Times in 0 Posts

    delete from DB using/linq/lamda expressions

    hi guys

    im currently trying to learn/understand how to delete/insert/update a simple database using a lamba expression via my web service

    this is not a live service this is just hobby learning and i have only been doing c# for a few months lol :/

    i currently have a web service working that when run will send a list of films from one service to another encrypted

    what im wanting to do is add some functions that firstly enable me to delete 1 film title then one to insert a film title then one to update a title

    i have this following bit of code for the delete part:

    public bool DeleteFilm2(int fid) {
    try {
    Film.Delete(x => x.FilmId == fid);
    return true; }
    catch (Exception) {
    return false;
    }
    }


    i have to be honest i dont even know where to start lol :

    heres is a screenshot of the solution tree
    Attached Thumbnails Attached Thumbnails delete from DB using/linq/lamda expressions-capture.png  


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •