Bugünün konusu unit of work implementasyonu eğer entity framework core ile çalışıyorsanız bunu incelemelisiniz. - 1 Web api dotnetcore entity framework ile bağlamak Link - 2 Generic Repository Pattern kullanmak Link - 3 Unit of work desenini oluşturmak Link Github kütüphane link Her bir uygulama katmanı için ayrı branch'e bakın. - Unit of work bir başka uygulama şekli Link - Mevcut dbniz için entityframework core ile mevcut scaffold modelleri çıkarmak Link - Dotnet tool ef update etmek için Link Entity framework core kullanmadan önce bu videonun içeriğini izleyin
Modeli json olarak gönderdiğizde hata alıyorduk, aslında gönderilen modeli kendisi parse ediyormuş :) var data = new RootObject(); var tar = new Target(); var ntf = new Notification(); var lpl = new List<string>() { Netmera.Enum.Program.Target.ANDROID.ToString(), Netmera.Enum.Program.Target.IOS.ToString(), Netmera.Enum.Program.Target.WP.ToString()}; tar.platforms = lpl; var ttags = new List (); ttags.Add("Fenerbahce"); ttags.Add("Galatasaray"); tar.tags = ttags; //tar.customFields = null; ntf.title = "deneme rest api başlık"; ntf.notificationMsg = "deneme mesajı test edilmiştir"; ntf.richPushHtml = null; data.target = tar; data.notification = ntf; var client = new RestClient("https://api.netmera.com/push/1.2/notification"); var reques
Bu fonksiyonu kullanabilirsiniz. Aşağı ve yukarı butonları şekildeki gibi çağırabilirsiniz. Buttondown ilgili ögeyi aşağıya indirecektir. ButtonUp ilgili ögeyi yukarı taşıyacaktır. protected void ButtonDown_Click(object sender, EventArgs e) { MoveListboxItem(1, ListBox2); } protected void ButtonUp_Click(object sender, EventArgs e) { MoveListboxItem(-1, ListBox2); } private void MoveListboxItem(int index, ListBox listBox) { if (listBox.SelectedIndex != -1) //is there an item selected? { //if it's moving up, the loop moves from first to last, otherwise, it moves from last to first for (int i = (index < 0 ? 0 : listBox.Items.Count - 1); index < 0 ? i < listBox.Items.Count : i > -1; i -= index) { if (listBox.Items[i].Selected) { //if it's moving up, it should not be the first item, or, if it's moving down, it should no
Yorumlar
Yorum Gönder