public Geo_Location GetEmployee_details() { Geo_Location geo_Location = new Geo_Location(); var g = from gl in dbContext.Geo_Location select gl; return(geo_Location); }
public Geo_Location GetGeo_Location(int id) { Geo_Location geo_Location = new Geo_Location(); var g = from gl in dbContext.Geo_Location where gl.Geo_Id == id select gl; return(geo_Location); }
public void PostGeoLocations([FromBody] Geo_Location geo_Location) { //Employee_Details int geo_id = 0; if (dbContext.Employee_Details.Any()) { geo_id = dbContext.Geo_Location.OrderByDescending(e => e.Geo_Id).FirstOrDefault().Geo_Id; } geo_id = geo_id + 1; geo_Location.Geo_Id = geo_id; geo_Location.created_Date = System.DateTime.Now; geo_Location.Last_Updated_Date = System.DateTime.Now; dbContext.Geo_Location.Add(geo_Location); dbContext.SaveChanges(); }