public void AddNewCoordinates(double lat, double lon, string user) { using (var context = new CheckInEntities()) { context.Coordinates.Add(new Coordinates { Latitude = lat, Longitude = lon, UserFK = user }); context.SaveChanges(); } }
/*Adding new user to database*/ public bool SignUpUser(string log, string pas, string mail) { using (var context = new CheckInEntities()) { try { context.LoginInfoes.Add(new CheckInEF.LoginInfo() { Login = log, Password = pas, Email = mail }); context.SaveChanges(); return(true); } catch (Exception ex) { return(false); } } }