Implementation of CRUD. I've solutions which read from database, I want to read using the data access layer -


// post: addresstypes/edit/5         [httppost]         public actionresult edit(edit edit)         {             if (!modelstate.isvalid)             {                 return view(edit);             }             try             {                 using (var context = new cascadecontext())                 {                     var addresstypes = context.addresstypes.firstordefault(x => x.id == edit.id);                     if (addresstypes == null)                     {                         return httpnotfound();                     }                    context.savechanges();                 return redirecttoaction("index");             }         }         catch         {             return view();         }     } 


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -