public IActionResult Sil(DirekSatisIlaclari item)
        {
            try
            {
                using (var dbConnection = DatabaseBaglanti.Connection())
                {
                    dbConnection.Open();
                    dbConnection.Execute("delete from public.direksatisilaclari where Id = @Id ", item);
                }

                return(Json(new { basarili = true }));
            }
            catch (System.Exception)
            {
                return(Json(new { basarisiz = true }));
            }
        }
        public IActionResult Kaydet(DirekSatisIlaclari item)
        {
            try
            {
                using (var dbConnection = DatabaseBaglanti.Connection())
                {
                    dbConnection.Open();
                    if (item.Id == 0)
                    {
                        dbConnection.Execute("insert into public.direksatisilaclari (id, ilacid,adet ) values(@id, @ilacid,@adet)", item);
                    }
                    else
                    {
                        dbConnection.Execute("update public.direksatisilaclari set id = @id, ilacid= @ilacid, adet=@adet where Id = @Id", item);
                    }
                }

                return(Json(new { basarili = true }));
            }
            catch (System.Exception ex)
            {
                return(Json(new { basarisiz = true }));
            }
        }