当前位置: 数据库>其它
本页文章导读:
▪EF基础一 EF基础,从0开始:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
namespace CodeFirstNewDatabase
{
cl.........
▪db2存储过程中循环语句while do的continue有没有? 各位db2存储过程大虾,有没有用过while do循环语句跳出当前循环继续下一个循环的方法啊?
作者:seminmredoxu 发表于2013-3-14 10:05:11 原文链接
阅读:60 评.........
▪oracle 创建DBLINK
create public database link to_113jmis connect to gh_jmis identified by gh_jmis using '113jmis';
--to_113jmis dblink 名称,gh_jmis/gh_jmis用户名,113jmis本地dns.
select * from fin_account_payment_split@to_115jmis
delete fin_contractor.........
[1]EF基础一
来源: 互联网 发布时间: 2013-11-07
EF基础,从0开始:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace CodeFirstNewDatabase { class Program { static void Main(string[] args) { using (var db = new BloggingContext()) { Console.Write("Enter a name for a new Blog: "); var name = Console.ReadLine(); var blog = new Blog { Name = name }; db.Blogs.Add(blog); db.SaveChanges(); var query = from b in db.Blogs orderby b.Name select b; Console.WriteLine("All blogs in the database:"); foreach (var item in query) { Console.WriteLine(item.Name); } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); } } } public class Blog { public int BlogID { get; set; } public string Name { get; set; } public string Url { get; set; } public virtual IList<Post> Posts { get; set; } } public class Post { public int PostID { get; set; } public string Title { get; set; } public string Content { get; set; } public int BlogId { get; set; } public virtual Blog Blog { get; set; } } public class User { [Key] // annotation: keyattribute public string Username { get; set; } public string Displayname { get; set; } } public class BloggingContext : DbContext { public DbSet<Blog> Blogs { get; set; } public DbSet<Post> Posts { get; set; } public DbSet<User> Users { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) // fluent api: override onmodelcreating method { modelBuilder.Entity<User>() .Property(u => u.Displayname) .HasColumnName("Display_name"); } } }
作者:incognito007 发表于2013-3-14 10:09:35 原文链接
阅读:49 评论:0 查看评论
[2]db2存储过程中循环语句while do的continue有没有?
来源: 互联网 发布时间: 2013-11-07
各位db2存储过程大虾,有没有用过while do循环语句跳出当前循环继续下一个循环的方法啊?
作者:seminmredoxu 发表于2013-3-14 10:05:11 原文链接
阅读:60 评论:0 查看评论
[3]oracle 创建DBLINK
来源: 互联网 发布时间: 2013-11-07
create public database link to_113jmis connect to gh_jmis identified by gh_jmis using '113jmis';
--to_113jmis dblink 名称,gh_jmis/gh_jmis用户名,113jmis本地dns.
select * from fin_account_payment_split@to_115jmis
delete fin_contractor_info@to_115jmis;
insert into fin_contractor_info@to_115jmis select * from fin_contractor_info@to_113jmis
--一个库数据复制到另一个库中。
作者:why489zhz 发表于2013-3-14 9:37:52 原文链接
阅读:62 评论:0 查看评论
最新技术文章: