Advertisement
Guest User

Untitled

a guest
Feb 28th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5.  
  6. namespace IP.webAPI.Models
  7. {
  8.     public class d
  9.     {
  10.       public   IP.webAPI.ipEntities entity = new ipEntities();
  11.       public addr_ a = new addr_();
  12.       public bool c { get; set; }
  13.       public int X = 0;
  14.         public string IpOfClient { get; set; }
  15.         public void saver(string ip)
  16.         {
  17.             a.IP = ip;
  18.             for (int i = 0; i < entity.addr_.ToArray().Length; i++)
  19.             {
  20.              if(entity.addr_.ToArray()[i].IP == ip){
  21.                  entity.addr_.Add(a);
  22.                  entity.SaveChanges();
  23.              }
  24.             }
  25.             IpOfClient = ip;
  26.  
  27.             }            
  28.            
  29.         }
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement