public Sys_Application FindByName(string applicationName)
 {
     String stmtId = "Sys_Application.FindByName";
     Sys_Application ap = new Sys_Application();
     ap.Name = applicationName;
     Sys_Application result = SqlMapper.QueryForObject<Sys_Application>(stmtId, ap);
     return result;
 }
 /// <summary>Implements <see cref="ISys_ApplicationService.Update"/></summary>
 public void Update(Sys_Application obj)
 {
     if (obj == null) throw new ArgumentNullException("obj");
     _repository.Update(obj);
 }
 /// <summary>Implements <see cref="ISys_ApplicationService.Insert"/></summary>
 public void Insert(Sys_Application obj)
 {
     if (obj == null) throw new ArgumentNullException("obj");
     _repository.Insert(obj);
 }
 private void InsertApplication()
 {
     Sys_Application app = _appRepository.FindByName(ApplicationName);
     if (app == null) {
         app = new Sys_Application();
         app.Name = ApplicationName;
         app.Description = string.Empty;
         _appRepository.Insert(app);
     }
 }
 /// <summary>Implements <see cref="ISys_ApplicationRepository.Update"/></summary>
 public void Update(Sys_Application obj)
 {
     if (obj == null) throw new ArgumentNullException("obj");
     String stmtId = "Sys_Application.Update";
     SqlMapper.Update(stmtId, obj);
 }