.net core mvc 5 soru cevap

add-migration yapınca The specified deps.json doesnt exists hatasının package managerdan çözemedim projenin bulunduğu klasorde cmdyi açıp

dotnet ef migrations add MyFirstMigration

komutunu çalıştırınca oldu ve sonrasında unutma

dotnet ef database update

dbcontexte modelde migrate işleminde ilgili propun eklenmesini isdemessen

[NotMapped]
public string URUNADI { get; set; }

DROPDOWN LIST MODELDE ENUM OLUSTURULUR ORNEK

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace KPET_MODULU2.Models
{
    public class  T_ODEMEISLEMI
    { 
        public ODEME_TIPI ODEME_TIPI { get; set; } = new ODEME_TIPI();  /*KK,MAILORDER,CEK*/ 
    }
    public enum ODEME_TIPI
    {
        KREDIKARTI,
        MAILORDER,
        CEK
    }
}

CONTROLLERDE SAĞ TIKLAYIP EKLE DENIR CREATE SECILIR VE ILGILI MODEL VE CONTEXT SECILIR VE YARATILAN SAYFAYA EKLENİR;asp-items=”Html.GetEnumSelectList()”

            <label asp-for="ODEME_TIPI" class="control-label"></label>
            <select asp-for="ODEME_TIPI" class="form-control" asp-items="Html.GetEnumSelectList<ODEME_TIPI>()"></select>
            <span asp-validation-for="ODEME_TIPI" class="text-danger"></span>

SQL SERVER COLUMNLARI DATATABLEA DİNAMİK OLARAK AKTARMA

        public static DataTable getReadingTableFromSchema()
        {
            string TARIH = DateTime.Now.Month.ToString() + "-" + DateTime.Now.Day.ToString() + "-" + DateTime.Now.Year.ToString();
            using (SqlConnection conn = new SqlConnection(CS))
            {
                string sql = string.Format("EXEC[LG_118_ONAY] '','{0}'",  TARIH);
                conn.Open();
                SqlCommand cmd = new SqlCommand(sql, conn);
                DbDataAdapter da = new SqlDataAdapter(cmd);
                DataTable dtbl = new DataTable();
                da.FillSchema(dtbl, SchemaType.Source);
                return dtbl;
            }
        }

        private void INITIALIZEGV()
        {
            DataTable DTNEW = getReadingTableFromSchema();
            DataTable DT = _M.SELECT_LISTE();
            string TARIH = DateTime.Now.Month.ToString() + "-" + DateTime.Now.Day.ToString() + "-" + DateTime.Now.Year.ToString();

            foreach (DataRow item in DT.Rows)
            {
                string STUDENTCODE = item[0].ToString(); 
                DataRow s = _M.SELECT_ONAY(CODE, TARIH).Rows[0];
                DTNEW.ImportRow(s);
            }

            gc_CONTROL1.DataSource = DTNEW;
        }

C# DEVEXPRESS XTRAINPUTBOX

BAZEN FORM YARATMADAN BURDAN DEĞER ALINABİLİR

            string reason = XtraInputBox.Show("Açıklama", "İptal Açıklamasını Giriniz", "");

            if (string.IsNullOrEmpty(reason) || string.IsNullOrWhiteSpace(reason) || reason == "")
            {
                MessageBox.Show("İptal İşleminde Açıklama Girmek Zorunludur.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
//handle cancel
   private void PrintBarcodeDirectClick(object sender, EventArgs e)
        {
            XtraInputBoxArgs xtraInputBoxArgs = new XtraInputBoxArgs();
            xtraInputBoxArgs.Caption = "Miktar";
            xtraInputBoxArgs.Prompt = "Yazılacak Miktar Giriniz";
            xtraInputBoxArgs.DefaultButtonIndex = 0;
            xtraInputBoxArgs.Showing += XtraInputBoxArgs_Showing;
            xtraInputBoxArgs.DefaultResponse = "1";

            SpinEdit editor = new SpinEdit();
            editor.Properties.IsFloatValue = false;
            editor.Properties.Mask.EditMask = "N00";
            editor.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            editor.Properties.Mask.UseMaskAsDisplayFormat = true;
            xtraInputBoxArgs.Editor = editor;

            var qty = XtraInputBox.Show(xtraInputBoxArgs);
            var result = qty?.ToString();
            MessageBox.Show(result);


        }

        private void XtraInputBoxArgs_Showing(object sender, XtraMessageShowingArgs e)
        {
            e.Form.Text = "Miktar";
        }

C# PROGRAM.CS CULTUREINFO

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace XXXDAS {
    static class Program {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() {
            Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("tr-TR");
            Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("tr-TR");
            DevExpress.UserSkins.BonusSkins.Register();

            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("McSkin");

            Application.EnableVisualStyles();

            Application.SetCompatibleTextRenderingDefault(false);

            Application.Run(new Login());
        }
    }
}

DEVEXPRESS XTRAGRID GROUP SUMMARY TO NEW GROUP SUMMARY

    private void GRV_FISICERIGI_CustomSummaryCalculate(object sender, DevExpress.Data.CustomSummaryEventArgs e) {
            if (!e.IsGroupSummary) return;
            if (e.SummaryProcess != CustomSummaryProcess.Finalize) return;

            var item = (GridSummaryItem)e.Item;
            switch (item.Tag) {
                case "G_DMHS":
                    if (e.IsGroupSummary) {
                        var CALISMADURUMU = int.Parse(GRV_FISICERIGI.GetGroupSummaryValue(e.GroupRowHandle, (GridGroupSummaryItem)GRV_FISICERIGI.GroupSummary["G_CALISMADURUMU"]).ToString());
                        e.TotalValue = (CALISMADURUMU - int.Parse(TE_HAFTA.Text)) * 8;
                    }
                    break;
                case "G_EMEESMADMHS":
                    if (e.IsGroupSummary) {
                        var EKMESAI = TimeSpan.Parse(GRV_FISICERIGI.GetGroupSummaryValue(e.GroupRowHandle, (GridGroupSummaryItem)GRV_FISICERIGI.GroupSummary["G_EKMESAI"]).ToString());
                        var EKSIMESAI = TimeSpan.Parse(GRV_FISICERIGI.GetGroupSummaryValue(e.GroupRowHandle, (GridGroupSummaryItem)GRV_FISICERIGI.GroupSummary["G_EKSIMESAI"]).ToString());
                        var CALISMADURUMU = int.Parse(GRV_FISICERIGI.GetGroupSummaryValue(e.GroupRowHandle, (GridGroupSummaryItem)GRV_FISICERIGI.GroupSummary["G_DMHS"]).ToString());
                        e.TotalValue = (EKMESAI - EKSIMESAI) + TimeSpan.FromHours(CALISMADURUMU);
                    }
                    break;
                case "G_EMEESMADMHSB8":
                    if (e.IsGroupSummary) {
                        var G_EMEESMADMHS = TimeSpan.Parse(GRV_FISICERIGI.GetGroupSummaryValue(e.GroupRowHandle, (GridGroupSummaryItem)GRV_FISICERIGI.GroupSummary["G_EMEESMADMHS"]).ToString());
                        e.TotalValue = (G_EMEESMADMHS.Hours + G_EMEESMADMHS.Minutes / 100.0 + G_EMEESMADMHS.Seconds / 10000.0) * (G_EMEESMADMHS > TimeSpan.Zero ? 1 : -1) / 8;

                    }
                    break;

            }
        }

DEVEXPRESS GRID LOAD SAVE FROM REGISTRY VERSION

   string version = "";
        public FRM_MALZEME_FIYATLARI() {
            InitializeComponent(); 
            version = "v" + Assembly.GetEntryAssembly().GetName().Version; 
  DX.DXGRID_LOADLAYOUTFROM_REGISTIRY(GRC_MALZEMEFIYATLARI, GetType().Namespace, "SATISFIYATI_OTOMASYONU_SERVICE__FRM_MALZEMELER_FIYATLARI" + version);
  DX.DXGRID_SAVELAYOUTTO_REGISTIRY(GRC_MALZEMEFIYATLARI, GetType().Namespace, "SATISFIYATI_OTOMASYONU_SERVICE__FRM_MALZEMELER_FIYATLARI" + version);
        }