stored-procedures,sql-server-2008-r2,mapping,dapper,sqlclientRelated issues-Collection of common programming errors
Killercam
sql-server-2008 stored-procedures bcp
All, I have a BCP export query. It is failing with the useless error mesage on BCP usage:usage: bcp {dbtable | query} {in | out | queryout | format} datafile [-m maxerrors] [-f formatfile] [-e errfile][-F firstrow] [-L lastrow] [-b batchsize][-n native type] [-c character type] [-w wide character type][-N keep non-text native] [-V file format version] [-q quoted identifier][-C code page specifier] [-t field terminator] [-r row termina
Killercam
sql-server-2008 stored-procedures bcp
All, in SELECT Data Set Using Stored Procedure with BCP Error @Remus Rusanu provided a great solution to the problem. However, this evolved in to another problem: this BCP query now runs DECLARE @SQL VARCHAR(8000); SELECT @SQL = ‘bcp “EXEC [2BSHAEOS]..ispsSelectEmptyAsNull ”B1A”;” ‘ + ‘queryout “F:\aaData\IPACostData\R15TData\2BSHAEOS_B1A_BCPTesting2.txt” ‘ +’-f “F:\aaData\IPACostData\R15TData\tmpFormatCard_B1A.fmt” -T -S’ + @@SERVERNAME + ”; EXEC master..xp_cmdshell @SQL; GOThis was then f
Jean-François Corbett
mysql sql stored-procedures cursor temp-tables
I’m doing some POC. I’ve written one stored procedure in MySQL. I’m using MySQLWorkbench for database operations like creating new table, stored procedures, query execution etc. I’m observing some unexpected execution behavior even though code looks correct syntactically and logically. Here are the points.Approach 1 -In first approach, I’m creating temporary table and adding recordsusing INSERT INTO …SELECT statement with selected columns.CREATE TEMPORARY TABLE XYZ(….);INSERT INTO XYZ (….)
Yarik
sql-server ms-access stored-procedures coding-style
Some of the stored procedures we have contain conditional logic, like this:Create Procedure dbo.DoSomething(Some Parameters) As…If (Some Condition) BeginSet @SomeVariable = SomeValue End…Select …When such a stored procedure is used as a recordsource for an MS Access form, and user tries to use built-in sorting/filtering functionality of the form, MS Access tries to execute the stored procedure in FMTONLY mode (apparently, hunting for metadata of the rowset provided by the st
aryanRaj_kary
stored-procedures db2
I am new to IBM db2 stored procedure, what I am trying to do is to get the values of a column from a table and build a select query based on these values, this is what I have tried, not sure how to proceedCREATE TYPE currencySymbols AS VARCHAR(20) ARRAY[100]@CREATE PROCEDURE ins_curr_ano(IN crsymbol VARCHAR(20), IN cost1 integer, IN cost2 integer, IN teirId integer) BEGIN DECLARE currencies currencySymbols; DECLARE maxCount INTEGER DEAFULT 0;set currencies = ARRAY[SELECT distinct(CURR_SYMBOL) a
bhamby
stored-procedures db2
I have a table emp(eid, ename, bossid, eloc) my requirement is to write a procedure to display all the employees and their boss name of all the employees who are located in the same location as per the given arguments (of a given emp id). The above query can be simply solved (for eid=10) using “with” clause as belowwith t (id, name, loc, bsid, bsname) as (select a.eid, a.ename, a.eloc, b.eid, b.enamefrom emp a, emp b where a.bossid = b.eid) select y.id, y.bsname from t x, t y where x.loc = y.lo
jonearles
sql stored-procedures db2
I am trying to write a sql script which checks if a table exists and if it does it deletes it, then re-creates the table I am trying to do this using an sql script for DB2 9.7 LUW using IBM Data studio 2.2(1) DECLARE @tablefound INTEGER ;SET @TABLEFOUND = (select COUNT(*) from syscat.tables where tabschema = ‘AELUM’ and tabname = ‘PRODUCTS’);(2) IF @TABLEFOUND>0 THENDROP TABLE “AELUM”.”PRODUCTS” ;(3) END IF; CREATE TABLE “AELUM”.”PRODUCTS” (“Created” DATE NOT NULL DEFAULT CURRENT_DATE,”Author
marc_s
asp.net-mvc nhibernate stored-procedures
I’m trying to use a stored procedure in my MVC4 project with NHibernate. Here is my NH mapping file.<?xml version=”1.0″ encoding=”utf-8″?> <hibernate-mapping assembly=”Model” namespace=”Model” xmlns=”urn:nhibernate-mapping-2.2″><class name=”Model.LOGERPIN, Model” table=”LOG_ERP_IN” schema=”dbo”><composite-id><key-property name=”ORDNO” type=”String”><column name=”ORDNO” not-null=”true” length=”300″ sql-type=”varchar” /></key-property><key-property name
user2520835
visual-studio-2010 stored-procedures parameters sql-server-2000 oledb
I’m using Visual Studio 2010. Within the project we add a DataSet, inside it; we have a Query Table Adapter to do all the queries to a SQL Server 2000 Data Base. One of the queries is formed using a Stored Procedure that receives four parameters. One of the parameters is a DateTime data type. Although we have check many times, we are receiving an unexpected exception:Provider encountered an error while sending command parameter[0] ” value and stopped processing. Conversion failed for command pa
Mohan
oracle stored-procedures plsql
I have an pl/sql procedure as mentioned belowCREATE OR REPLACE PROCEDURE add_affectedCircle (v_affected_circle IN v_circle.circle_code%type) ISv_circle_id NUMBER;BEGINv_circle_id := get_circleID(v_affected_circle);INSERT INTO vf_affected_circle (affected_circle) values (v_circle_id);EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR (-20101, ‘Problem in loading Affected Circle data’); END; /First I was checking the particular data v_affected_circle is available in circle_code column in vf_circl
sgvirtzman
sql sql-server sql-server-2008-r2
I set up SQL Server 2008 R2 Performance Studio data collection from this tutorial. Data collection appears to be working great but, when I right-click on Data Collection –> Reports –> Management Data Warehouse and then select any of the reports to load, I get the following error:’Failed to connect to server sql1.myserver.com. –< Login failed. The login is from an untrusted domain and cannot be used with Windows Authentication.’This is strange because I set up a new SQL login for MDW to use
Adam Wenger
jdbc sql-server-2008-r2 jtds denali sql-server-2012
I am trying to connect Sql Server Data Base using windows authentication from my application using JTDS driver but i got following errorSSO Failed: Native SSPI library notloaded. Check the java.library.pathsystem property.Following are the scenarios where i tried to resolve but still something is missing..i have added ntlmauth.dll in system directory and it works fine for Sql server 2005. But the same thing i tried for Sql Server 2008 R2 and Denali but it gives me the same error as i mentioned a
Praveenks
sql-server-2008-r2 bcp
While trying to BCP IN from text to table, I am facing below mentioned error:Starting copy… SQLState = 22005, NativeError = 0 Error = [Microsoft][SQL Server Native Client 10.0]Invalid character value for cast specification SQLState = S1000, NativeError = 0Error = [Microsoft][SQL Server Native Client 10.0]Unexpected EOF encountered in BCP data-file0 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total : 47 Format file: Please find the format file hereInput File: Please
Warren P
sql-server sql-server-2008-r2 tcpip
So far I have learned the following facts about Microsoft SQL Server Express, including version 2012, and earlier versions like 2008R2, and 2008, and for the most part all the way back to SQL Server 2005. I am configuring an SQL SERVER on a “workgroup server” machine, that is to say, it’s a dedicated server box, running Windows Server OS, but it’s using a WORKGROUP, and it’s only running Microsoft SQL Express.Note the following background facts:Configuring an SQL Express instance comes out of t
Marc
windows-server-2003 sql-server-2008-r2
I’m trying to connect my access front-end to the SQL Server backend.It was working when SQL Server was on my computer but now i’m trying to connect to a serverSo when I create the DSN file with accessI chose SQL-Server driver ( I have also tried with SQL-Server native 10.0 ) I enter the server name that I copied from SQL Management Studio so there’s no typo there I chose the NT authenticationThen I have this errorIn the properties, I tried with TCP/IP with the default port 1433 and I also tried
Kermit
php windows-server-2008-r2 iis7 sql-server-2008-r2
I am having difficulties getting the SQL Server extension to work with PHP on Windows Server. The installation went fine and I’m able to load phpinfo through the browser. However, when I enable php_sqlsrv_54_ts.dll, it throws a 500 – Internal server error. There are no errors logged to the PHP log.Here are the steps I’ve performed:Followed the PHP manual install guide and configuring IIS to process PHP requests Downloaded & installed Microsoft Drivers 3.0 for PHP for SQL Server Downloaded &a
Max Vernon
sql-server sql-server-2008-r2 mirroring high-availability
I am putting a HA SQL server environment up based on three SQL Server 2008 R2 machines and database mirroring.I’ll name them :principal.company.intra mirror.company.intra witness.company.intraThe “company.intra” domain is the holding company’s domain.Both database engines are listening on the static 52002 port so client applications access them the following way : principal.company.intra,52002 & mirror.company.intra,52002Endpoints are called EP_Mirroring at principal and mirror, EP_Witness a
mnDBA
sql-server-2008-r2
Will preface this by saying I am not at all convinced yet this is not the vendor doing something wrong on their application server. Just looking for new ideasInstance X is a named instance of SQL Server 2008 R2. It houses numerous databases and takes in connections from numerous application servers. Browser service is running and all connections are made by way of server\instance name.Moved DB from an old 2K5 instance over to it the other day and vendor claims he cannot connect to the DB. He
user354534
sql-server-2008-r2 sql-server-2012 upgrade
When I tried to upgrade SQL Server 2008 R2 to SQL Server 2012 everything went well except below issueHow do I fix it? Do I need to uninstall SQL Server 2012 again? EDITFeature: Reporting Services – NativeStatus: Failed: see logs for detailsReason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.Next Step: The upgrade process for SQL Server failed. Use the fo
vivek
sql-server sql sql-server-2008-r2 ssis
i am executing query like this on sql server 2008 R2 DECLARE @returncode int EXEC @returncode = xp_cmdshell ‘dtexec /f “C:\certs\SSIS Disposition\SSIS Disposition\SSIS Disposition\Package1.dtsx”‘and getting errorMicrosoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. NULL Started: 12:08:21 AM Error: 2014-03-21 00:08:21.71Code: 0xC0016016Source: Description: Failed to decrypt protected XML node “DTS:Passwor
Liron Levi
oracle nhibernate mapping timestamp datetimeoffset
I can’t make NHibernate successfully map the native oracle “TIMESTAMP WITH TIME ZONE” type to the CLR DateTimeOffset type. It seems that Oracle chose to completely ignore the native DateTimeOffset type and is using their own proprietary type (OracleTimeStampTZ) in their ADO.NET provider. Since NHibernate is using native CLR types (like the DateTimeOffset type) – the Oracle ADO.NET provider fails any attempt to insert a row with such a type.Do any of you have an idea how this issue can be solved
bontade
hibernate spring mapping
I have 2 models.User:@Entity public class User implements Serializable {Long id;String name;List<Car> cars;public User() {}public Long getId() {return id;}public void setId(Long id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public List<Car> getCars() {return cars;}public void setCars(List<Car> cars) {this.cars = cars;} }Car:@Entity public class Car implements Serializable { Long id; String mark; public Car() {} publ
markjason72
java hibernate mapping package
while using hibernate,I came across this problem mapping classes in two different packages.I have a myapp.domain.ItemforSale class which is to be mapped to myapp.cart.CartItemI created CartItem.hbm.xml as below<hibernate-mapping package=”myapp.cart”> <class name=”CartItem” table=”CARTITEM”><id name=”cartItem_id” column=”CARTITEM_ID” type=”long”><generator class=”native”/></id><property name=”quantity” type=”int” column=”QUANTITY” /><many-to-one name=”itemfo
Nick Josevski
ubuntu-10.04 virtualbox gps mapping
When I try to run the install program I get a popup message that says the installer program is not a valid executable.Background: I want a GPS with maps on my laptop running Ubuntu 10.4LTS. Unfortunately I can’t find a decent native Linux GPS solution with 50 state US street level coverage. I have VirtualBox VMs available for WinXP and Win7 (among others). The VMs work fine with MicroSoft Streets and Trips (2010) and MapNGo 5 (a very! old Delorme product), but while both these products suppor
Kawu
java hibernate jpa mapping eclipselink
I have three tables:CREATE TABLE PostAddresses (contact_id INTEGER NOT NULL,ordinal_nbr SMALLINT NOT NULL,PRIMARY KEY (contact_id, ordinal_nbr) );CREATE TABLE Foos (contact_id INTEGER NOT NULL,ordinal_nbr SMALLINT NOT NULL,PRIMARY KEY (contact_id, ordinal_nbr),FOREIGN KEY (contact_id, ordinal_nbr) REFERENCES PostAddresses (contact_id, ordinal_nbr) );CREATE TABLE Bars (contact_id INTEGER NOT NULL,ordinal_nbr SMALLINT NOT NULL,numba INTEGER NOT NULL,PRIMARY KEY (contact_id, ordinal_nbr, numba),FOR
sergionni
hibernate mapping fetch one-to-one subselect
There are User,Person and Employee entities. User knows about both Person and Employee.hibernate config for User:… <many-to-one name=”person” class=”entry.Person” column=”perid” not-null=”true” cascade=”all”/> <many-to-one name=”employee” class=”entry.Employee” column=”empid” not-null=”true” cascade=”all”/> …DAO:public List<User> getUsers() {return getHibernateTemplate().find(“from User”); }When fetch users with getUsers(),that Person and Employee data is NULL.Have I missed
loup
c# asp.net mapping dapper
I’ve only just started looking at Dapper.net and have just been experimenting with some different queries, one of which is producing weird results that i wouldn’t expect.I have 2 tables – Photos & PhotoCategories, of which are related on CategoryIDPhotos Table PhotoId (PK – int) CategoryId (FK – smallint) UserId (int)PhotoCategories Table CategoryId (PK – smallint) CategoryName (nvarchar(50))My 2 classes:public class Photo {public int PhotoId { get; set; }public short CategoryId { ge
Fabio B.
coldfusion mapping coldfusion-10
I have the following directory structure:| SITES_FOLDER|___ WEBSITE1|___ WEBSITE_CFC|___ CFC_DIRWEBSITE1 contains an Application.cfc and some pages. Then I have a component ShoppingCart.cfc inside the WEBSITE_CFC directory that is instantiated on session start using this code:createObject(“component”,”WEBSITE_CFC.ShoppingCart”).Init() /> This works.Now I move ShoppingCart.cfc to the CFC_DIR directory and change my instantiate code to:createObject(“component”,”CFC_DIR.ShoppingCart”).Init(
James Schek
mapping gis route
I’m look for a GIS/Mapping tool that will give me easy SERVER-SIDE access to route information (specifically, trip time and distance) in an ASP.NET web application.From what I can tell, Google and Yahoo maps do everything client-side in javascript, but neither provide services to retrieve just the route information. I’m interested in both free and paid products. Also, if you have experience with a product I like to hear about what you think (complexity of API, runtime performance, likes, dislike
J. S.
java jaxb mapping dozer
I’m working with JAXB and JPublisher. I have two classes:class A{JAXB<Object> jaxbattr; }class B{TypeA jpublishattrA;TypeB jpublishattrB; }In class A, I have to map the “jaxbattr” either to “jpublishattrA” or to “jpublishattrB”. This depends on the name of the jaxbattribute, which I don’t know until runtime. The attributes “jpublishattrA” and “jpublishattrB” are both Strings.I guess I’ll have to solve this with a custom-converter, but I don’t know how. Any ideas?
svick
c# dapper reflection.emit unboxing dynamicmethod
Overview (forgive me for being so detailed, but I’d rather it be too much than too little): I’m attempting to edit the Dapper source for our solution in such a way that when any DateTime or Nullable is read from the database, its DateTime.Kind property is always set to DateTimeKind.Utc.In our system, all DateTimes coming from the front end are guaranteed to be in UTC time, and the database (Sql Server Azure) is storing them as DateTime type in UTC (We are not using DateTimeOffsets, we are just
loup
c# asp.net mapping dapper
I’ve only just started looking at Dapper.net and have just been experimenting with some different queries, one of which is producing weird results that i wouldn’t expect.I have 2 tables – Photos & PhotoCategories, of which are related on CategoryIDPhotos Table PhotoId (PK – int) CategoryId (FK – smallint) UserId (int)PhotoCategories Table CategoryId (PK – smallint) CategoryName (nvarchar(50))My 2 classes:public class Photo {public int PhotoId { get; set; }public short CategoryId { ge
cogumel0
c# dynamic dapper
I’m using Dapper to query from SQL and have a dynamic query as such:var returns = conn.Query(dynamicQuery);When I then cycle through the results, I would like to find out what the type of date I am handling is so I tried doing the following:foreach (var result in results) {MessageBox.Show(result.GetType().ToString()); }But it always fails on the MessageBox with the error Cannot perform runtime binding on a null reference.If I use this instead:var returns = conn.Query<object>(dynamicQuery);
Michael Perrenoud
c# dapper
I have an application in which I’m saving unknown structured data. So, let’s assume for a moment there is a table in the database named Foo and it looks like this:CREATE TABLE [dbo].[Foo] ([Id] INT NOT NULL PRIMARY KEY IDENTITY, [DataId] INT NOT NULL, [Bar] VARCHAR(50) NOT NULL, CONSTRAINT [FK_Foo_Data] FOREIGN KEY ([DataId]) REFERENCES [Data]([Id]) )And Foo is related to a table named Data which is going to store the provider who logged the data as well as the date and time it was logged, and l
Jay Walker
c# linq casting dapper dynamic-language-runtime
I’m using a method that has a return signatur of IEnumerable<dynamic>. At runtime for a particular call it is returning List<Dapper.SqlMapper.FastExpando>.var x0 = repo.Find(proc, param); //x0 runtime type is {List<Dapper.SqlMapper.FastExpando>}LINQPad.Extensions.Dump indicates the runtime type of x0 is: List<IDictionary<String, Object>> but I can’t seem to cast/convert to List<IDictionary<String, Object>>. Here is a screenshot of the Linqpad Dump:Ulti
Stephan Ryer
.net dapper
I use dapper in .NET 4.5 to ease querying my MS SQl database. The following works just fine:NO PROBLEMS:const string sql = @” SELECT g.Name, g.Slug, g.CreatedDate, COUNT(r.Id) recipientCount FROM Groups g LEFT JOIN GroupRecipients r ON r.GroupId = g.Id WHERE g.CustomerId = @CustomerId GROUP BY g.Id, g.Name, g.Slug, g.CreatedDate”;return _connection.Query(sql, new { CustomerId = customerId }).ToList();PROBLEM SELECTING ‘Id’ COLUMN – RAISES VerificationException:const string sql = @” SELECT g.Id,
SLoret
dapper
I have one query that does a count/group by where I don’t need a parameter (there is no where clause). What is the syntax to run a parameterless query with dapper?var _results = _conn.Query<strongType>(“Select Count(columnA) as aCount, ColumnB, ColumnC from mytable group by ColumnB, ColumnC”);does not work. I’ve tried it a few different ways but I still keep getting “ArgumentNullException was unhandled by user code”.Tried to figure it out myself, searched all over and I’m giving up. Thanks
user1428798
stored-procedures sql-server-2008-r2 mapping dapper sqlclient
I have a model this model: public class Member{#region public propertypublic int Id { get; set; }public string LastName { get; set; }public string FirstName { get; set; }public AccountState AccountState { get; set; }public GodFatherType GodFatherType { get; set; } }AccountState and GodFatherType Are both 2 eumerates:public enum AccountState {NotActivated = 0,Activated = 1,Desactived = 2,}public enum GodFatherType{Undefined=0,unknown = 1,Correct = 2,}In The database I have Id, LastName, FistName
dankorz
dapper
I know this is similar to Correct use of Multimapping in Dapper, but I think it’s slightly different. I have the following POCO structure:public class Customer {public int customerkey { get; set; }public string FirstName { get; set; }public string LastName { get; set; }public string EmailAddress { get; set; }public List<Invoice> Invoices { get; set; }public int statekey { get; set; }public State State { get; set; }public Customer(){this.Invoices = new List<Invoice>();} }public class
Chirdeep Tomar
sqlite3 mono dapper
I am using Mono, SQLite, Dapper & Dapper Extensions. I can read from the database but Insert is not working. I am using Mono Driver for sqlite. Error is not very informative, atleast to me. Any help will be much appreciated.Error: SQLite error near “.”: syntax error at Mono.Data.Sqlite.SQLite3.Prepare (Mono.Data.Sqlite.SqliteConnection cnn, System.String strSql, Mono.Data.Sqlite.SqliteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in <filename unknown>
KyleMit
c# linq wcf exception sqlclient
I couldn’t figure out what is the problem for this exception. The type initializer for ‘System.Data.SqlClient.SqlConnection’ threw an exceptionFirst attempt: I was using the WCF Service to make some small application. It works just fine and I can use the LINQ properly. After 2 or 3 days. Maybe after I close Visual studio and load the project again. The exception appear.The 2nd attempt also the same. I create another project and it work just fine until I do something else (I do not change any cod
user1778345
c# sql-server sql-server-2012 sqldatatypes sqlclient
Some background:I’m running two different installations of SQL Server on two different VMs. I’m attempting to connect to them from my code (which was written for SQL Server 2008 R2). My current .NET framework version is 4.0. My Microsoft SQL Server 2008 R2 installation is running the AdventureWorks designed for it, and my SQL Server 2012 Express installation is running the newer AdventureWorks2012 database. I’m querying Person.Address.Currently I’m running into an exception saying “DataType cann
Faisal
.net sqlclient
I have a process where two threads are continuously executing sql queries on the same tables. Is there any chance that one of these two threads gets Timeout error? If so, what is the best practice to avoid this?I am getting following error and resulting is process crash.Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Ofear
tcp system provider sqlexception sqlclient
My web site was working flawless in the old Host, But now i Moved to a new hostPlease pay attention: The Old host was a VPS on the same hostSo i’v stoped paying him and now i’m hosting on the same host as a shared host.So I moved all the files in to the root folder and config the SQL details in the Web.configI can’t load the site for some reason. i got Errors all the time. PLEASE HELP ME!After I Fixed my Ajax problem.. Here ->Could not load file or assembly System.Web.Extensions, Version=1.0.61
Colin Mackay
.net sql-server ado.net connection-string sqlclient
I can’t seem to connect to my local database. Everytime I run it, it gives me a pop up blank windows (blank command line windows).What do I miss?using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient;namespace dbtest1 {class Program{static void Main(string[] args){string myConnectionString = “Initial Catalog=myDB;Data Source=localhost;Integrated Security=SSPI;”;SqlConnection myConnection = new SqlConnection(myConnectionString);string myInsertQuery = “INSER
Molloch
.net sql-server sqlclient
We have a very data centric application, which is often run across networks with questionable connectivity.We want to feedback to clients when the database is offline, and display some kind of warning screen – with error information – until the network comes back and the database is available again. I’d like to display the same screen whenever the database is unavailable for any reason – ie: service stopped, paused, login failure, network off, etc.I have a routine handling SQLClient.SQLException
Michael Petrotta
c# sql windows-services sqlclient
I have a .Net/c# 2.0 windows service. The entry point is wrapped in a try catch block that notifies me of problems and allows the service to continue operating normally yet when I look at the server’s application event log I see a number of “EventType clr20r3” errors that are causing the service to die unexpectedly. The catch block has a “catch (Exception ex)” and does not rethrow the exception.Each sql commands is of the type “CommandType.StoredProcedure” and are executed with SqlDataReader’s
j.i.h.
sql-server vb.net logging exception-handling sqlclient
I created an exception logging system by having a handler for System.Windows.Forms.Application.ThreadException. I am fairly confident in the soundness of my logging, but this is making me wonder what could be causing this. And furthermore, how so many Exceptions could be logged onto the server when the server is so slow it’s causing timeouts.Basically, there have been a few instances when our SQL server was doing an import process in the middle of the day and users were getting SqlExceptions w
user1428798
stored-procedures sql-server-2008-r2 mapping dapper sqlclient
I have a model this model: public class Member{#region public propertypublic int Id { get; set; }public string LastName { get; set; }public string FirstName { get; set; }public AccountState AccountState { get; set; }public GodFatherType GodFatherType { get; set; } }AccountState and GodFatherType Are both 2 eumerates:public enum AccountState {NotActivated = 0,Activated = 1,Desactived = 2,}public enum GodFatherType{Undefined=0,unknown = 1,Correct = 2,}In The database I have Id, LastName, FistName
Web site is in building