Example #1
0
 public int CreateUser(RegisterView model)
 {
     if (model != null)
     {
         var exist = dbContextService.Exists <User>(x => x.Name == model.Name.ToLower());
         if (!exist)
         {
             var user = model.To <User>();
             var ret  = dbContextService.Add <User>(user);
             return((int)ret);
         }
         return(-1);
     }
     return(0);
 }