Пример #1
0
        public static servi Ver_Servis(ref otosisdbEntities dbModel, int ServisID)
        {
            servi servis = null;

            servis = (from abc in dbModel.servis
                      where abc.ServisID == ServisID
                      select abc).FirstOrDefault();

            if (servis != null)
            {
                dbModel.Refresh(RefreshMode.StoreWins, servis);
            }

            return(servis);
        }
Пример #2
0
        public static int ekleServisKayit(int aracid)
        {
            otoservisdbEntities db = new otoservisdbEntities();

            using (db)
            {
                var   tarih     = DateTime.Today;
                servi yenikayit = new servi();
                yenikayit.aracID      = aracid;
                yenikayit.servisGiris = tarih;
                db.servis.Add(yenikayit);
                db.SaveChanges();

                return(yenikayit.servisID);
            }
        }