Blog.DAL.PostDAL.EdytujPost C# (CSharp) Метод

EdytujPost() публичный Метод

public EdytujPost ( int id, string tytul, string tresc, int status ) : void
id int
tytul string
tresc string
status int
Результат void
        public void EdytujPost(int id, string tytul, string tresc, int status)
        {
            using (LinqTodbBlogDataContext context = new LinqTodbBlogDataContext())
            {
                var post = context.Posties.Single(p => p.id == id);
                post.tytul = tytul;
                post.tresc = tresc;
                post.status = status;
                post.data_modyfikacji = DateTime.Now;

                context.SubmitChanges();
            }
        }

Same methods

PostDAL::EdytujPost ( int id, string tytul, string tresc, int status, string tagi, string opis ) : void