Click here to Skip to main content
15,901,035 members
Home / Discussions / Database
   

Database

 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
jschell28-Jan-14 10:40
jschell28-Jan-14 10:40 
QuestionDatabase Design Tools? Pin
Code_Crash26-Jan-14 21:41
Code_Crash26-Jan-14 21:41 
AnswerRe: Database Design Tools? Pin
Richard MacCutchan26-Jan-14 21:58
mveRichard MacCutchan26-Jan-14 21:58 
AnswerRe: Database Design Tools? Pin
Jörgen Andersson27-Jan-14 1:36
professionalJörgen Andersson27-Jan-14 1:36 
GeneralRe: Database Design Tools? Pin
Code_Crash27-Jan-14 2:27
Code_Crash27-Jan-14 2:27 
AnswerRe: Database Design Tools? Pin
thatraja27-Jan-14 2:15
professionalthatraja27-Jan-14 2:15 
GeneralRe: Database Design Tools? Pin
Code_Crash27-Jan-14 2:31
Code_Crash27-Jan-14 2:31 
QuestionEntity framework Pin
columbos1492725-Jan-14 7:58
columbos1492725-Jan-14 7:58 
Hello,
I am a new in EF.
I have a Customewr class:
C#
public class Customer
{
    public int CustomerId { get; set; }
    public string Name { get; set; }
    public string Email { get; set; }
}


And here is my DbContext class:
XML
public class DiveShopContext:DbContext
{
  public DbSet<Customer> Customers { get; set; }
}

I want to be able to save Customers to my DB, i do it as follow:
<pre lang="cs">class Program
{
    static void Main(string[] args)
    {
       using (var db = new DiveShopContext())
       {

           var customer = new Customer();
           customer.CustomerId = 3045;
           customer.Name = &quot;Alex&quot;;

           db.Customers.Add(customer);
           db.SaveChanges();
       }
    }
}</pre>

Every thing is saved fine but the CustomerId is changed from 3045 to 1 and saved.

AnswerRe: Entity framework Pin
jschell25-Jan-14 13:01
jschell25-Jan-14 13:01 
AnswerRe: Entity framework Pin
S Douglas26-Feb-14 10:28
professionalS Douglas26-Feb-14 10:28 
GeneralMessage Closed Pin
25-Jan-14 3:18
anilkg2y25-Jan-14 3:18 
GeneralMessage Removed Pin
25-Jan-14 13:01
jschell25-Jan-14 13:01 
GeneralMessage Removed Pin
25-Jan-14 21:21
mveRichard MacCutchan25-Jan-14 21:21 
GeneralMessage Removed Pin
27-Jan-14 3:18
professionalShameel27-Jan-14 3:18 
Questionsql/PLSQL :need a expert help on this Pin
ramina sen23-Jan-14 6:38
ramina sen23-Jan-14 6:38 
QuestionRe: sql/PLSQL :need a expert help on this Pin
Eddy Vluggen23-Jan-14 7:55
professionalEddy Vluggen23-Jan-14 7:55 
QuestionSSRS - No of Rows per page Pin
berba22-Jan-14 19:50
berba22-Jan-14 19:50 
AnswerRe: SSRS - No of Rows per page Pin
Mycroft Holmes22-Jan-14 21:30
professionalMycroft Holmes22-Jan-14 21:30 
QuestionMS-Access finding unmatched records Pin
BennyCriziko22-Jan-14 5:31
BennyCriziko22-Jan-14 5:31 
AnswerRe: MS-Access finding unmatched records Pin
Eddy Vluggen22-Jan-14 8:42
professionalEddy Vluggen22-Jan-14 8:42 
GeneralRe: MS-Access finding unmatched records Pin
BennyCriziko22-Jan-14 9:26
BennyCriziko22-Jan-14 9:26 
GeneralRe: MS-Access finding unmatched records Pin
Eddy Vluggen24-Jan-14 9:50
professionalEddy Vluggen24-Jan-14 9:50 
AnswerRe: MS-Access finding unmatched records Pin
Chris Quinn22-Jan-14 20:40
Chris Quinn22-Jan-14 20:40 
QuestionHow to query data base with 3 different conditions Pin
VishwaKL21-Jan-14 22:50
VishwaKL21-Jan-14 22:50 
AnswerRe: How to query data base with 3 different conditions Pin
Shameel21-Jan-14 23:32
professionalShameel21-Jan-14 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.