1.用vs2013建模如果
[img]http://dl2.iteye.com/upload/attachment/0110/5525/f428a18e-bf05-398d-9688-ed76b44aee7c.jpg[/img]
自动生成代码
用户和部门实体
用户操作契约:
[img]http://dl2.iteye.com/upload/attachment/0110/5525/f428a18e-bf05-398d-9688-ed76b44aee7c.jpg[/img]
自动生成代码
用户和部门实体
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool
// Changes to this file will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AbractFactory
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class Department
{
public virtual int ID
{
get;
set;
}
public virtual string DepartmentName
{
get;
set;
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool
// Changes to this file will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AbractFactory
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class User
{
public virtual int ID
{
get;
set;
}
public virtual string UserName
{
get;
set;
}
}
}
用户操作契约:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool
// Changes to this file will be lost if the