public void Apply(Backend.API.Data.DataContext context) { context.Users.AddRange(new [] { new UserEntity { Name = "Anton Boyko", Email = "*****@*****.**", Phone = "+123456887456" }, new UserEntity { Name = "Sergey Solod", Email = "*****@*****.**", Phone = "+383456887456" }, new UserEntity { Name = "Ivan Ivanov", Email = "*****@*****.**", Phone = "+456987123852" }, new UserEntity { Name = "Petro Petrov", Email = "*****@*****.**", Phone = "+159987741369" } }); context.SaveChanges(); }
public bool IsPresent(Backend.API.Data.DataContext context) { var isPresent = context.Users.Any(p => p.Name == "Anton Boyko"); return(isPresent); }