示例#1
0
 public async Task <int> AddAlertAsync(Alert alert)
 {
     if (alert == null)
     {
         return(-1);
     }
     using (IUnitOfWork uow = DataAccessLayer.GetUnitOfWork())
     {
         IEventRepository repos = DataAccessLayer.GetEventRepository(uow);
         return(await repos.AddAlert(alert));
     }
 }