/// <summary> /// Logs ekler. (volkansendag - 02.08.2016) /// </summary> internal rValue <decimal> Add(pLogs prms, Bilet blt, CuteModel db) { if (prms.appName.isEmpty()) { throw Exceptions.Parameter("Uygulama bulunamadı"); } if (prms.message.isEmpty()) { throw Exceptions.Parameter("Mesaj boş olamaz."); } var ent = new DAL.Model.Logs(); if (blt == null) { blt = new Bilet(); } ent.appName = prms.appName; ent.logLevel = prms.logLevel; ent.message = prms.message; ent.guid = Guid.NewGuid().ToString(); ent.createDate = DateTime.Now; ent.creatorIP = blt.IP; ent.creatorId = blt.KullaniciId; ent.logData = prms.logData; Database.DAL.dalBase.Add(ent, db); return(new rValue <decimal>(ent.id)); }
/// <summary> /// Logs ekler. (volkansendag - 02.08.2016) /// </summary> public rValue <decimal> Add(pLogs prms, Bilet blt) { using (var db = getDb()) { try { return(Add(prms, blt, db)); } catch (ProcessException ex) { return(ex.GetResult <rValue <decimal> >()); } } }