public void ActivityLog_Create(int accountid, int userid, string entitytype, string entityaction, DateTime activitydatetime, string activitydetails)
        {
            try
            {
                IActivityLogRepository activityrep = new EntityActivityLogRepository();

                ActivityLog activitylog = new ActivityLog();
                activitylog.AccountID = accountid;
                activitylog.UserID = userid;
                activitylog.Username = "******";
                activitylog.EntityType = entitytype;
                activitylog.EntityAction = entityaction;
                activitylog.ActivityDateTime = activitydatetime;
                activitylog.ActivityDetails = activitydetails;

                activityrep.CreateActivityLog(activitylog);
            }
            catch { }
        }
 public void CreateActivityLog(ActivityLog activitylog)
 {
     db.ActivityLogs.Add(activitylog);
     db.SaveChanges();
 }