public void AddClientLog(DT.ClientLog log)
 {
     using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
         context.ClientLogs.InsertOnSubmit(Convert.ToEntity(log));
         context.SubmitChanges();
     }
 }
        public void DeleteClientLog(DT.ClientLog log)
        {
            RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);

            using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
                context.ClientLogs.DeleteOnSubmit(Convert.ToEntity(log));
                context.SubmitChanges();
            }
        }
Exemple #3
0
 public static DA.ClientLog ToEntity(DT.ClientLog source)
 {
     return(new DA.ClientLog()
     {
         Timestamp = source.Timestamp,
         ResourceId = source.ResourceId,
         Message = source.Message
     });
 }