private static ModelViews.TrackingLog.Extend Create(ModelViews.TrackingLog.Extend view)
        {
            var data = new DAL.trackingLog();

            try
            {
                using (var ctx = new TraditionEntities())
                {
                    if (view.Id == 0)
                    {
                        data.clientId      = view.ClientId;
                        data.authUserId    = view.AuthUserId;
                        data.recordId      = view.RecordId;
                        data.recordTable   = view.RecordTable;
                        data.memo          = view.Memo;
                        data.trackingState = view.TrackingState;

                        data.created   = DateTime.Now;
                        data.ipAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

                        ctx.AddTotrackingLogs(data);
                        ctx.SaveChanges();
                    }
                }
            }
            catch (Exception ex)
            {
                data = new DAL.trackingLog();
            }
            return(Mappers.TrackingLog.Basic(data));
        }
        private static ModelViews.TrackingLog.Extend Create(ModelViews.TrackingLog.Extend view)
        {
            var data = new DAL.trackingLog();
            try
            {
                using (var ctx = new TraditionEntities())
                {
                    if (view.Id == 0)
                    {

                        data.clientId = view.ClientId;
                        data.authUserId = view.AuthUserId;
                        data.recordId = view.RecordId;
                        data.recordTable = view.RecordTable;
                        data.memo = view.Memo;
                        data.trackingState = view.TrackingState;

                        data.created = DateTime.Now;
                        data.ipAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

                        ctx.AddTotrackingLogs(data);
                        ctx.SaveChanges();

                    }
                }
            }
            catch (Exception ex)
            {
                data = new DAL.trackingLog();
            }
            return Mappers.TrackingLog.Basic(data);
        }