enitityframework 怎么添加oracle
发布网友
发布时间:2023-03-23 06:03
我来回答
共1个回答
热心网友
时间:2023-10-13 11:28
enitityframework 怎么添加oracle
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestEntityFramework.Models
{
/// <summary>
/// 设置数据库表名
/// </summary>
[Table(name: "employees")]
public class employees
{
/// <summary>
/// ID不为空设置为Required
/// </summary>
[Required]
public string ID { get; set; }
public string Name { get; set; }
public string Sex { get; set; }
public string Age { get; set; }
}
}