This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function chatYukle() { | |
var query = firebase.database().ref("chats"); | |
var kadi = $("#kadi").val(); | |
query.on('value', function (snapshot) { | |
$("#mesajAlani").html(""); | |
snapshot.forEach(function (childSnapshot) { | |
var data = childSnapshot.val(); | |
if (data.from == kadi) { | |
//Mesaj bizim tarafımızdan gönderilmişse bu alan çalışacak | |
var mesaj = `<div class="d-flex justify-content-end"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uyeKaydet(){ | |
var kadi = $("#kadi").val(); | |
if(kadi != ""){ | |
var userKey = firebase.database().ref("users/").push().key; //Rastgele bir userkey gönderir. | |
firebase.database().ref("users/"+userKey).set({ | |
username: kadi, | |
kulid: userKey | |
}); | |
$("#girisEkrani").hide(); | |
$("#chatEkrani").show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row" style="margin-top:40px;"> | |
<div class="container"> | |
<div class="card bg-light" style="height:80%;"> | |
<div class="card-header"> | |
Sohbet Uygulaması | |
</div> | |
<div class="card-body" style="max-height: 80%;overflow-y: auto;"> | |
<!-- Giriş ekranı tasarımı başlangıcı --> | |
<div id="girisEkrani" > | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="chatEkrani"> | |
<div class="row"> | |
<div id="mesajAlani bg-white" class="col-md-12"> | |
<div class="d-flex"> | |
<div class="alert alert-dark" role="alert"> | |
<b>@kizildas</b> Bu mesaj karşı taraftan geldi! | |
</div> | |
</div> | |
<div class="d-flex justify-content-end"> | |
<div class="alert alert-info" role="alert"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="container"> | |
<div class="card bg-light" style="height:100%;"> | |
<div class="card-header"> | |
Sohbet Uygulaması | |
</div> | |
<div class="card-body" style="max-height: 80%;overflow-y: auto;"> | |
<!-- Giriş ekranı tasarımı başlangıcı --> | |
<div id="girisEkrani"> | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace CoreAPI.Models | |
{ | |
public class Book | |
{ | |
[Key] | |
public int BookID { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.EntityFrameworkCore; | |
namespace CoreAPI.Models | |
{ | |
public class DatabaseContext : DbContext | |
{ | |
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
=> optionsBuilder.UseNpgsql("Host=localhost;Database=CoreAPIDb;Username=postgres;Password=1273"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace CoreAPI.DTOs | |
{ | |
public class BookInfoDto | |
{ | |
public int BookID { get; set; } | |
public string Name { get; set; } | |
public string AuthorName { get; set; } | |
} | |
} |
OlderNewer