/// <summary>
 /// Update a row
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int Company_Update(Company entity)
 {
     return companyDal.Company_Update(entity);
 }
        /// <summary>
        /// Update a row
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Company_Update(Company entity)
        {
            using (SqlConnection connection = new SqlConnection(AppConfiguration.ConnectionString))
            {
                try
                {
                    SqlCommand command = new SqlCommand("Company_Update", connection);
                    command.CommandType = CommandType.StoredProcedure;

                    command.Parameters.Add("@Company_Id", SqlDbType.UniqueIdentifier);
                    command.Parameters["@Company_Id"].Value = entity.Company_Id;
                    command.Parameters.Add("@Company_Name", SqlDbType.NVarChar);
                    command.Parameters["@Company_Name"].Value = entity.Company_Name;
                    command.Parameters.Add("@Company_Logo", SqlDbType.NVarChar);
                    command.Parameters["@Company_Logo"].Value = entity.Company_Logo;
                    command.Parameters.Add("@Company_Description", SqlDbType.NVarChar);
                    command.Parameters["@Company_Description"].Value = entity.Company_Description;
                    command.Parameters.Add("@Company_Phone", SqlDbType.NVarChar);
                    command.Parameters["@Company_Phone"].Value = entity.Company_Phone;
                    command.Parameters.Add("@Company_Email", SqlDbType.NVarChar);
                    command.Parameters["@Company_Email"].Value = entity.Company_Email;
                    command.Parameters.Add("@Company_Address", SqlDbType.NVarChar);
                    command.Parameters["@Company_Address"].Value = entity.Company_Address;
                    command.Parameters.Add("@Company_IsDelete", SqlDbType.Bit);
                    command.Parameters["@Company_IsDelete"].Value = entity.Company_IsDelete;

                    connection.Open();
                    return command.ExecuteNonQuery();
                }
                catch (Exception)
                {

                    throw;
                }
                finally
                {
                    connection.Dispose();
                }
            }
        }
 /// <summary>
 /// Insert a row
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int Company_Insert(Company entity)
 {
     return companyDal.Company_Insert(entity);
 }