본문 바로가기

c#

(26)
[EntityFramework]Unable to update the EntitySet because it has a DefiningQuery and no <UpdateFunction> element exists in the <ModificationFunctionMapping> element to support the current operation. Unable to update the EntitySet {{TABLE_NAME}} because it has a DefiningQuery and no element exists in the element to support the current operation.해당 Entity 에 primary key 가 있는지 확인 합니다. (대부분 pk가 없어서 발생하는 오류임.)
[C#] 특정기간 동안 월단위로 무언가 처리 할때 using System; public class Program { public static void Main() { Boolean isFinished = false; string dealYear = "2017"; string dealMonth = "6"; DateTime procDateTime = new DateTime(Convert.ToInt32(dealYear), Convert.ToInt32(dealMonth), 1); TimeSpan timeSpan; while(!isFinished) { timeSpan = DateTime.Now.AddDays(1-DateTime.Now.Date.Day) - procDateTime; if (timeSpan.Days
[C#][다음API] 좌표로 주소를 얻어내기 좌표로 주소를 얻어내기 다음 API http://apis.map.daum.net/web/sample/coord2addr/ #region " [ gps 좌표로 주소(행정동) 반환 ] " public class ToAddress { public string type { get; set; } public string code { get; set; } public string name { get; set; } public string fullName { get; set; } public string regionId { get; set; } public string name0 { get; set; } public string code1 { get; set; } public string name1 { get; se..
[C#][EF] 들어오는 TDS(Tabular Data Stream)의 RPC(원격 프로시저 호 출) 프로토콜 스트림이 잘못되었습니다. 매개 변수 1("@0_0"): 제공된 값이 데이터 형식 geography의 잘못된 인스턴스입니다. 원본 데이.. 들어오는 TDS(Tabular Data Stream)의 RPC(원격 프로시저 호 출) 프로토콜 스트림이 잘못되었습니다. 매개 변수 1("@0_0"): 제공된 값이 데이터 형식 geography의 잘못된 인스턴스입니다. 원본 데이터에 잘못된 값이 있는지 확인하십시오. 잘못된 값의 예로는 소수 자릿수가 전체 자릿수보다 큰 숫자 형식의 데이터를 들 수 있습니다. shp 파일에서 geometry data type 을 geography type으로 변환 후 EF6 -> mssql bulk insert 과정에서 만난 에러메세지 입니다. 참고 : https://www.exceptionnotfound.net/fixing-sql-server-spatial-not-a-valid-instance-of-geography-er..
[c#] selenium chrome driver windows max size public void WindowsResize() { this.driver.Manage().Window.Maximize(); }
[c#] selenium chrome driver scrollup/down 브라우저화면에 보이지 않는 영역의 element 를 찾기는 하나 클릭이벤트를 발생 시키지 못한다. 그래서 해당 element 가 나타나는 스크롤까지 임의로 스크롤을 이동시켜줘야한다. element의 위치 Location.x , y 를 가지고 스크롤 시켜줘도 되고 일정한 높이를 줘도 된다. up/down 은 javascript 를 실행하는 함수를 호출해서 스크립트로 제어한다. driver.Manage() 에는 스크롤 관련 함수가 없으며 window 위치와 크기를 제어하는 부분만 있다. public void ScrollUp(int x, int y) { IJavaScriptExecutor js = this.driver as IJavaScriptExecutor; Thread.Sleep(500); js.Execu..
[c#] mssql spatial data 길이 취급 주의 geometry/geography varbinary(max) 가 한계 길이 STAsText() 로 Sql Management에서 취급하는 것은 한계가 있다. UnitTest 나 Console 프로그램에서 Binary로 전송 된 Data 들을 다시 Text로 변환 후 수정하고 다시 Binary 로 업데이트 한다. 주고 받는 형식은 sql 쪽은 Binary C# 쪽에서는 Bytes로 취급한다.
[c#] DLL 'SqlServerSpatial140.dll'을(를) 로드할 수 없습니다. 지정된 모듈을 찾을 수 없습니다. (예외가 발생한 HRESULT: 0x8007007E) An exception of type 'System.DllNotFoundException' occurred in Microsoft.SqlServer.Types.dll but was not handled in user code Additional information: DLL 'SqlServerSpatial140.dll'을(를) 로드할 수 없습니다. 지정된 모듈을 찾을 수 없습니다. (예외가 발생한 HRESULT: 0x8007007E) 참조https://goo.gl/WEKl7c https://goo.gl/7OewbA https://goo.gl/oYEqLt