zoukankan      html  css  js  c++  java
  • linq to entity

    /// <summary>
            /// 添加庄稼
            /// </summary>
            /// <param name="_UserFarm"></param>
            /// <returns></returns>
            public UserFarm AddUserFarm(UserFarm _UserFarm)
            {
                            DataContext.AddToUserFarm(_UserFarm);
                DataContext.SaveChanges();
                return _UserFarm;
            }

    ---------------------------------------------以上不可以是添加 ,为更新的操作.--------------

    /// <summary>
            /// 添加庄稼
            /// </summary>
            /// <param name="_UserFarm"></param>
            /// <returns></returns>
            public UserFarm AddUserFarm(UserFarm _UserFarm)
            {
                UserFarm uf = new UserFarm();
                uf = _UserFarm;
                DataContext.AddToUserFarm(uf);
                DataContext.SaveChanges();
                return uf;
            }

  • 相关阅读:
    slf4j+log4j2的配置
    日志规约
    log4j2配置文件log4j2.xml详解(转载)
    好用的打包工具webpack
    gulp插件
    学习自动化工具gulp
    git
    nodejs学习随笔
    好用的meta标签
    小问题记录
  • 原文地址:https://www.cnblogs.com/dudu837/p/1438383.html
Copyright © 2011-2022 走看看