Exemplo n.º 1
0
        public static bool IsExisting(this PhoneData payload, PhoneContext IdContext)
        {
            var validatedNumber = IdContext.Phones.FirstOrDefault(x => x.DDD == payload.DDD && x.PhoneNumber == payload.PhoneNumber);

            if (validatedNumber != null)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
 public static bool SaveNumber(this PhoneData payload, PhoneContext IdContext)
 {
     IdContext.Phones.Add(payload);
     return(true);
 }