public bool Delete(TblNot model) { const string Sql = "delete from public.kullanicinot where id = @id"; _genericRepository.Delete(Sql, model); const string DeleteSqlTblNot = "delete from public.tblnot where id = @notid"; return(_genericRepository.Delete(DeleteSqlTblNot, model)); }
public bool Insert(int etkinlikid, TblNot tblNot) { int tblnotid = _tblNotService.Insert(tblNot); KullaniciNot kullaniciNot = new KullaniciNot { KullaniciId = tblNot.Olusturankisi, NotId = tblnotid, Etkinlikid = etkinlikid }; const string Sql = "insert into public.kullanicinot (kullaniciid, notid, etkinlikid) values (@kullaniciid, @notid, @etkinlikid)"; return(_genericRepository.Insert(Sql, kullaniciNot)); }
public IActionResult TblNotSave(TblNot model) { int etkinlikId = model.Olusturankisi; model.Olusturankisi = HttpContext.Session.GetInt32("kullaniciid").Value; if (model.Id == 0) { _kullaniciNotService.Insert(etkinlikId, model); } else { model.Guncelleyenkisi = model.Olusturankisi; _kullaniciNotService.Update(model); } return(Redirect("/Activity/Notes/" + etkinlikId)); }
public bool Update(TblNot model) { const string Sql = "update from public.tblnot set konu = @konu, aciklama = @aciklama where id = @id"; return(_genericRepository.Update(Sql, model)); }
public int Insert(TblNot model) { const string Sql = "insert into public.tblnot (konu, aciklama) values (@konu, @aciklama)"; return(_genericRepository.InsertAndGetId(Sql, model)); }
public bool Delete(TblNot model) { const string Sql = "delete from public.tblnot where id = @id"; return(_genericRepository.Delete(Sql, model)); }